This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get all SNPs that are in high linkage disequilibrium (based on D') for a set of SNPs

Hello, I have phased plink files of a population. I would like to obtain all SNPs that are in high linkage disequilibrium (LD) for a set of 10 SNPs. I know how to do it according to a r2 threshold, but I need to set this threshold according to D'

For instance, this script will output all variants in high LD (r2 > 0.6) for a list of 10 SNPs within a range of 1000 Kb.

plink \
    --bfile myfile \
    --r2 --ld-snp-list list_10_snps.txt \
    --ld-window-kb 1000 --ld-window-r2 0.6

Thanks very much

plink snp ld

R Bioconductor SNPRelate package has snpgdsLDpruning function with option of filtering on "dprime". This package can import plink format files.

1 answer

This isn't directly supported by plink, but you can use "--r2 dprime" to include D' in the main LD report, and then follow up with e.g. an awk one-liner to filter on D'.

Log in to answer this question.