Why PLINK is producing different LD result with the same dataset?
1
1
Entering edit mode
3.1 years ago

Hello, I have my genetic data in *.bim *.bed and *.fam format. I have a *.txt file containing the SNPs of my interest. I want to estimate pairwise linkage disequilibrium (LD) among all of the SNPs in that Text file. I want to obtain the LD r2 values both as a list and a square matrix format. I have used the following codes for the list and matrix format, respectively:

plink --bfile plink_binary.0 --allow-no-sex --extract file.txt --r2 --out file
plink --bfile plink_binary.0 --extract file.txt --r2 square --write-snplist --out file

Both of them produce the desire results. However, there is a discrepancy between the two output files. I used output which is in List format in R and used the dcast function to convert the list into a matrix format. So that I can plot the LD heatmap. When I want to do that, I cannot produce the LD heatmap and shows the error that it is not a square matrix. But if I used the matrix output from PLINK then everything is fine. However, the matrix from PLINK and the matrix from R is not the same. I see that in the List output format there is a SNP that is not present (may be it has no LD or very low LD). But I am not sure whether that SNP is omitted when PLINK produce the output as a matrix. Because in the matrix output, the name of the SNPs are not printed.

Does anyone have any ideas on what is wrong here? Any suggestions will be appreciated. Thank you.

SNP sequence genome R software error • 1.3k views
ADD COMMENT
1
Entering edit mode
3.1 years ago
Sam ★ 4.7k

With matrix output, PLINK will calculate all pairwise LD in the data. However, with the non-matrix output, only SNPs within the --ld-window and with R2 > those indicated in --ld-window-r2 are output. See here for more information

ADD COMMENT
0
Entering edit mode

Thank you very much. I have solved the issue with the --inter-chr command.

ADD REPLY

Login before adding your answer.

Traffic: 2609 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6