Question: VCFtools LD calculations only for pairs that include a single SNP of interest
gravatar for Scott
5.6 years ago by
Scott80 wrote:

I would like to calculate LD statistics for a VCF file using VCFtools. For the 1Mb window I am interested in, even using a R^2 minimum of 0.2, it is taking quite a bit of time to calculate these statistics.

I am ultimately only interested in LD statistics that include a single SNP of interest. Is there a way to have VCFtools compute LD stats only for pair-wise comparisons that include my SNP of interest, but still over the whole 1Mb region?  

My understanding is that the "ld-window" options can define only the entire region to use, so they are not useful for this application. 

ADD COMMENTlink modified 5.6 years ago by Adam990 • written 5.6 years ago by Scott80
gravatar for Adam
5.6 years ago by
United States
Adam990 wrote:

The yet-to-be-released version of vcftools (in the SVN) has a new option that allows you to do something like this. The option is called --hap-r2-positions, and allows you to specify a list of sites to be tested against all other sites for LD. To use the option, you just use --hap-r2-positions <positions_filename>.

ADD COMMENTlink written 5.6 years ago by Adam990

That's useful, and means the conversion to plink is now unnecessary, cheers.

ADD REPLYlink written 5.6 years ago by smilefreak420
gravatar for smilefreak
5.6 years ago by
New Zealand
smilefreak420 wrote:

Hi Scott,

Plink has this functionality, you could use VCFtools to extract your region of interest and convert to the plink format.

Then use Plink for the ld calculations for your SNP, the command would look similar to this one below, which I copied from the plink documentation.

    plink --file mydata 
          --ld-snp rs12345 
          --ld-window-kb 1000 
          --ld-window 99999 
          --ld-window-r2 0

ADD COMMENTlink modified 7 months ago by RamRS27k • written 5.6 years ago by smilefreak420

What is --ld-window 99999 ?? I run the commends with --ld-window 99999 and --ld-window 999. The result was smaller with later one. And output SNPs are totally different, not overlapped, why??

ADD REPLYlink written 8 weeks ago by jiwon0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1298 users visited in the last hour