Explanation of parameters

402 views
Skip to first unread message

Ana Marija

unread,
Feb 5, 2019, 1:51:52 PM2/5/19
to plink2-users
Hello

Can someone please explain me what is this parameter?
--qual-threshold

Also what is the difference between:
--qual-threshold and 
--rsq

My understanding is that
Rsq is a measure which estimates the squared correlation between imputed and true genotypes. Eg. Option - -rsq 0.3 will filter those SNPs which have Rsq value smaller or equal to 0.3 and change the format of only those SNPs which have Rsq ≥ 0.3.

Thank you
Ana

Ana Marija

unread,
Feb 5, 2019, 2:35:41 PM2/5/19
to plink2-users

I think that --qual-threshold 0.5 will remove all SNPs with scores less than 0.5, where score refers to R2.

Can someone please confirm this?

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher Chang

unread,
Feb 5, 2019, 2:45:07 PM2/5/19
to plink2-users
--qual-threshold only exists for backward compatibility with 2007-era workflows.  --vcf-min-gq is far more likely to be relevant today.

plink does not have a --rsq flag.

On Tuesday, February 5, 2019 at 11:35:41 AM UTC-8, Ana Marija wrote:

I think that --qual-threshold 0.5 will remove all SNPs with scores less than 0.5, where score refers to R2.

Can someone please confirm this?

On Tue, Feb 5, 2019 at 12:51 PM Ana Marija wrote:
Hello

Can someone please explain me what is this parameter?
--qual-threshold

Also what is the difference between:
--qual-threshold and 
--rsq

My understanding is that
Rsq is a measure which estimates the squared correlation between imputed and true genotypes. Eg. Option - -rsq 0.3 will filter those SNPs which have Rsq value smaller or equal to 0.3 and change the format of only those SNPs which have Rsq ≥ 0.3.

Thank you
Ana

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users+unsubscribe@googlegroups.com.

Ana Marija

unread,
Feb 5, 2019, 2:49:03 PM2/5/19
to Christopher Chang, plink2-users
ok thanks but can you please explain me what --vcf-min-gq exactly represents/does?

this is how my QC commands looked like:

plink --vcf chr20.dose.vcf.gz --make-bed --double-id --out s1
plink --bfile s1 --bmerge s1 --merge-mode 6
plink --bfile s1 --exclude plink.missnp --make-bed --out s2
plink --bfile s2 --list-duplicate-vars
plink --bfile s2 --exclude plink.dupvar --make-bed --out s3
plink --bfile s3 --qual-scores chr20.info 7 1 1 --qual-threshold 0.5 --make-bed --out s4
plink --bfile s4 --maf 0.01 --hwe 0.000001 --snps-only --make-bed --out s5
plink --bfile s5  --geno 0.02 --mind 0.02 --make-bed --out FINAL_DATA_QC20P

how do I implement --vcf-min-gq parameter?

To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.

Christopher Chang

unread,
Feb 5, 2019, 3:04:37 PM2/5/19
to plink2-users
Okay, this is a valid application of --qual-threshold, though I'm guessing you could accomplish the same thing by using plink 2.0 to filter on the VCF INFO field.

--vcf-min-gq erases genotypes when the standard VCF "GQ" value is present and below the threshold you provide.  With your dosage data, plink 2.0's --hard-call-threshold and --import-dosage-certainty flags may be more relevant.

On Tuesday, February 5, 2019 at 11:49:03 AM UTC-8, Ana Marija wrote:
ok thanks but can you please explain me what --vcf-min-gq exactly represents/does?

this is how my QC commands looked like:

plink --vcf chr20.dose.vcf.gz --make-bed --double-id --out s1
plink --bfile s1 --bmerge s1 --merge-mode 6
plink --bfile s1 --exclude plink.missnp --make-bed --out s2
plink --bfile s2 --list-duplicate-vars
plink --bfile s2 --exclude plink.dupvar --make-bed --out s3
plink --bfile s3 --qual-scores chr20.info 7 1 1 --qual-threshold 0.5 --make-bed --out s4
plink --bfile s4 --maf 0.01 --hwe 0.000001 --snps-only --make-bed --out s5
plink --bfile s5  --geno 0.02 --mind 0.02 --make-bed --out FINAL_DATA_QC20P

how do I implement --vcf-min-gq parameter?

On Tue, Feb 5, 2019 at 1:45 PM Christopher Chang wrote:
--qual-threshold only exists for backward compatibility with 2007-era workflows.  --vcf-min-gq is far more likely to be relevant today.

plink does not have a --rsq flag.

On Tuesday, February 5, 2019 at 11:35:41 AM UTC-8, Ana Marija wrote:

I think that --qual-threshold 0.5 will remove all SNPs with scores less than 0.5, where score refers to R2.

Can someone please confirm this?

On Tue, Feb 5, 2019 at 12:51 PM Ana Marija wrote:
Hello

Can someone please explain me what is this parameter?
--qual-threshold

Also what is the difference between:
--qual-threshold and 
--rsq

My understanding is that
Rsq is a measure which estimates the squared correlation between imputed and true genotypes. Eg. Option - -rsq 0.3 will filter those SNPs which have Rsq value smaller or equal to 0.3 and change the format of only those SNPs which have Rsq ≥ 0.3.

Thank you
Ana

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users+unsubscribe@googlegroups.com.

kitty

unread,
Nov 4, 2019, 7:03:29 AM11/4/19
to plink2-users
Hi Ana and Chris,

I am using the same code as Ana to process the data: plink --bfile s1 --bmerge s1 --merge-mode 6

I use plink1.9. I remembered that previously it would yield an output file plink.missnp for multialliac SNPs, but now it seems giving an output plink.diff. I wonder if plink.diff is the same as previous plink.missnp? And I tried the same command with plink2, it seems not working with plink2?

Many thanks.

Kitty
To unsubscribe from this group and stop receiving emails from it, send an email to plink2...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2...@googlegroups.com.

Christopher Chang

unread,
Nov 4, 2019, 11:36:51 AM11/4/19
to plink2-users
1. The .missnp file is generated when a regular merge is attempted.  "--merge-mode 6" is not a regular merge, it's a genotype conflict detector.
2. Merge is not implemented yet in plink 2.0, which is why it's still considered to be in an "alpha" rather than "beta" state.

kitty

unread,
Nov 5, 2019, 11:35:42 AM11/5/19
to plink2-users
Thank you Chris. I think I did use the codes below previously to exclude multialliac SNPs:
plink --vcf chr1.dose.vcf.gz --const-fid 0 --make-bed --out s1
plink --bfile s1 --bmerge s1 --merge-mode 6
plink --bfile s1 --exclude plink.missnp --make-bed --out s2

plink1.9 now gives me the plink.diff output rather than plink.missnp, just wonder if there is any changes to the PLINK recently? I looked at the manual again, it says "For efficiency reasons, this list is no longer generated during a failed text fileset merge; convert to binary and remerge when you need it". I wonder how I can remove the variants with more than two alleles now please?


Kitty

Christopher Chang

unread,
Nov 5, 2019, 12:54:27 PM11/5/19
to plink2-users
Actually, my initial response was incorrect, --merge-mode 6 does not suppress generation of the .missnp file.  When no .missnp file is generated, that's because there are no multiallelic variants.

Of course, you may be wondering why there are no multiallelic variants in s1.{bed,bim.fam} when you can easily see them in chr1.dose.vcf.gz.  The answer is that, when plink 1.9 encounters a multiallelic variant, it only keeps the most common two alleles, and treats the rest as missing.  (To entirely remove these variants instead, add --biallelic-only to your --vcf command line.)  It's when multiallelic variants have been "split" in the VCF into several biallelic variants with the same ID, and/or you have multiple variants with the '.' VCF missing-variant-ID code, that the second and third lines of this script become relevant.
Reply all
Reply to author
Forward
0 new messages