-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hello,
Thank you for this wonderful algorithm. It is helping well in my research. However, I am struggling with a generated --xld output. I have Plink binary file for 7790 SNPs all located in chromosome 22 (chr22b38.bed/bim/fam) with sample n=462. Previously I have partitioned the chromosome into 19 non-overlapping LD blocks, each block having SNPs ~410. I want to decompose these 19 LD-aware blocks into intra-chromosomal LD components i.e. (in my understanding) I want to investigate scaled LD between these 19 LD blocks and generate a similar heatmap that you provided.
First, I generated block-wise xld output. I took --block-snps as 410.
gear --xld --bfile chr22b38 --xld-alg 0 --block-snps 410 --chr 22 --out chr22snp410
The .xld file looks like this:
Tagi SNPi Tagj SNPj rsq sd pval rsq_s sd_s pval_s
22_1 410 22_1 410 0.0107504 4.65688e-05 1.05619e-09 1 0 0
22_2 410 22_1 410 0.000514991 4.18766e-05 0.000125575 0.0461333 0.00377786 0.000129085
22_2 410 22_2 410 0.0173592 7.52093e-05 1.0569e-09 1 0 0
22_3 410 22_1 410 0.000494785 3.79814e-05 0.0001002 0.0497569 0.00384697 0.000103056
22_3 410 22_2 410 0.00054377 4.82584e-05 0.000176721 0.0408134 0.00364716 0.000181533
22_3 410 22_3 410 0.0142784 6.1858e-05 1.05665e-09 1 0 0
So, for 19 blocks 19 tags were generated.
Next, I sourced the 'Visualization.R' script as mentioned in the wiki section. But when I used the following R code,
library(ggplot2)
source("Visualization.R")
X_LD_Visualization(input = "PLINK_XLD/chr22snp410.xld",
output = "PLINK_XLD/chr22snp410.xld",
significant = FALSE)
it gave me the error:
Error in order(chrLD$CHRi, chrLD$CHRj) : argument 1 is not a vector
Why such an error is coming and where did I get wrong? And how to fix this error? I have attached the .xld and the log as well, if required.
Thank you so much,
Soham