This is a test version of Biostars. For the public version, visit https://www.biostars.org.
IBD calculation with Plink

It's been a while since I last used Plink to calculate IBS/IBD. For a given VCF file, test.vcf, I did maf filtering and calculated IBD with these commands:

plink  --vcf test.vcf --maf 0.05 --recode --out test.vcf
plink --file test.vcf --genome

Do I also need to do Hardy-Weinberg or any other filtering before these steps? Could someone please clarify.

plink ibd

1 answer

  1. Use --make-bed/--bfile over --recode/--file. Existing Plink 2.0 builds don't even support --file; instead, VCF is now Plink's main text format.
  2. If you haven't performed basic QC on that data, yes, of course you want to get rid of probably-wrong genotype calls before any analysis, not just IBS/IBD. (I actually prefer a one-way Hardy-Weinberg filter for QC, e.g. plink2 --bfile ... --hwe 1e-25 keep-fewhet --make-bed --out .... This retains correctly-called variants which violate Hardy-Weinberg equilibrium due to population stratification.)
  3. What do you need IBS/IBD estimates for? --genome is pretty obsolete at this point. If you're trying to identify close relations, Plink 2's --make-king[-table] and --king-cutoff commands are faster and more reliable. If you need IBD for other purposes, substantially better methods of estimating IBD have been developed over the last 12 years; see e.g. PC-Relate (https://rdrr.io/bioc/GENESIS/man/pcrelate.html ) and Refined IBD (https://faculty.washington.edu/browning/refined-ibd.html ).

Hi Chris, ./plink2 --make-bed --vcf test.vcf --maf 0.05 --out test.vcf only creates test.vcf.fam, but not .bim and .bed files. Do I have to do make-just.. for bim and bed files?

  1. Please recheck your output directory. This command does create .bim and .bed files.
  2. I recommend replacing "--out test.vcf" with something like "--out test2". You're creating files with very strange names.

Log in to answer this question.