BGI-shenzhen / LDBlockShow

LDBlockShow: a fast and convenient tool for visualizing linkage disequilibrium and haplotype blocks based on VCF files
MIT License
134 stars 40 forks source link

comparing D' scores of PLINK and LDBlockShow #27

Closed mennodejong1986 closed 2 weeks ago

mennodejong1986 commented 1 year ago

Thanks for making and sharing this great tool.

I am trying to reproduce with plink the exact same D' prime values as observed in the TriangleV.gz file, using the following commands:

For LDBlockShow:

LDBlockShow -BlockType 1 -InVCF mydata.vcf.gz -OutPut output.ldblockshow -MAF 0.2

For PLINK:

vcftools --maf 0.2 VCF mydata.vcf.gz --gzvcf mydata.vcf.gz --recode --recode-INFO-all --out mydata.maf0.2

plink --vcf mydata.maf0.2.recode.vcf --allow-extra-chr --r2 dprime --ld-window 1000 --ld-window-kb 500 --ld-window-r2 0 --out output.plink

However, when I compare the first entries in the plink output and those in the TriangleV.gz file (assuming that the topleft values in the matrix correspond to the first lines in the plinkoutput.ld file), the values do not match. (In contrast, the haploblock regions identified with plink --blocks are identical).

Should I be using another plink command?

Thanks in advance for your help!

Menno

hewm2008 commented 1 year ago

you can clarify snp comparisons in triangle as #18 . the D' value of LDblockshow is be the same with haploview , also I guess the D' value should be the same with plinks .