Entering edit mode
5.8 years ago
biosol
▴
170
Hi all,
I'm trying to remove SNPs that are in linkage disequilibrium (r2 = 0.8) from my GWAS dataset. For the moment, I've been trying the following command:
plink --vcf myvcf.vcf --const-fid 0 --r2 --ld-window-r2 0.8 --recode vcf --out myvcf.out
It actually works and generates a .ld
output file with pairwise r2 values for the SNPs. However, I was wondering if there is a method that directly removes those SNPs from the .vcf
instead of having to pass the output list given in the .ld
file to another plink --exclude
command.
Thanks for the help in advance!
Related posts:
I have not seen any way to directly remove these with PLINK. I do not believe it is too much effort to have to use 2 commands, and it also helps with documentation by producing the output list of SNPs that are in / not in LD.