Calculating LD between two groups of snps

135 views
Skip to first unread message

DJon

unread,
May 23, 2024, 11:36:43 AM5/23/24
to plink2-users
Hi,

I want to calculate LD between two groups of snps where each of the snps in the first group is compared with every snp on the other group but not the snps with the same group. And get the results in a matrix. Is there a way to do it in Plink?

I also  tried following (which I think get a matrix with all the snps in the list, this is not exactly I wanted however) but got an error. Following is my code and the error message. What is the error here?

Command

plink2 --bfile $in_folder/autosome_imp --r2-unphased 'inter-chr' 'square' --ld-window-r2 0 --ld-snp-list snp_list.txt

(snp_list.txt is the file having the list of snps).

Output

PLINK v2.00a3LM 64-bit Intel (25 Feb 2020)     www.cog-genomics.org/plink/2.0/

(C) 2005-2020 Shaun Purcell, Christopher Chang   GNU General Public License v3

Logging to plink2.log.

Options in effect:

  --bfile /labs/UKBioBank/data/genetic/imp/bed_info_0.8/bed/autosome_imp

  --ld-snp-list snp_list.txt

  --ld-window-r2 0

  --r2-unphased inter-chr square


Start time: Wed May 22 17:02:08 2024

Error: Unrecognized flag ('--ld-snp-list').

For more info, try "plink2 --help <flag name>" or "plink2 --help | more".


Thanks.

DJon


Christopher Chang

unread,
May 26, 2024, 1:20:11 PM5/26/24
to plink2-users
--r2-unphased requires a recent alpha 6 build.  You're using a build ~4 years too old.
Reply all
Reply to author
Forward
0 new messages