Hi,
I have a list of 241 SNPs. I would like to compute LD r2 values between all such pairs of SNPs where one pair is from the given list and the other is any other SNP in my genome-wide genotype data.
What I have tried:
plink-1.9/plink --bfile "$genotype_data" \
--r2 \
--ld-snp-list "$snplist" \
--out LD_between_pairs_of_snps
However, the output includes less SNP pairs than expected so I guess some pre-defined filtering was applied to produce R2 values only between some smaller set of pairs of SNPs.
In the
documentation of ld-snp-list it says "You can request values for all pairs in matrix format (if you specify 'bin', 'bin4', and/or one of the
matrix shape modifiers), all pairs in table format (with '
inter-chr'), or a limited window in table format (this is the default)" so next I tried using the 'inter-chr' modifier for --r2, but the output file still does not seem to include all the SNP pairs that I wanted.
Then I read the documentation further and found the
'yes-really' modifier, and tried running
plink-1.9/plink --bfile "$genotype_data" \
--r2 yes-really \
--ld-snp-list "$snplist" \
--out LD_between_pairs_of_snps
but then I got the error saying "--ld-snp/--ld-snps/--ld-snp-list cannot be used with the --r/--r2 matrix output modifiers".
I think computing R2 values between all possible pairs of SNPs in my genome-wide genotype data with the
'yes-really' modifier would not be possible due to memory issues.
Best,
Anni