Question: vcftools --TajimaD in sliding windows
0
gravatar for sonia.olaechea
5 months ago by
sonia.olaechea60 wrote:

Hi all,

I'm trying to calculate Tajima's D with vcftools parameter --TajimaD 5000 and I wonder whether there is another parameter that allows to calculate it in sliding windows. I've seen that there is something similar to calculate pi (--window-pi and --window-pi-step) and fst (--fst-window-size and --fst-window-step).

Any help will be appreciated, thanks in advance!

tajima's d vcftools snp • 597 views
ADD COMMENTlink modified 5 months ago • written 5 months ago by sonia.olaechea60
1
gravatar for sonia.olaechea
5 months ago by
sonia.olaechea60 wrote:

Hey again,

it looks like vcf-kit is more straightforward for calculating Tajima's D value in sliding windows! To be honest, I haven't been really able to make PopGenome function, but vcf-kit is quite easy:

vk tajima 5000 3000 input.vcf > output.TajimaD

5000 refers to the window size and 3000 the step size of the sliding window.

ADD COMMENTlink written 5 months ago by sonia.olaechea60
0
gravatar for Kevin Blighe
5 months ago by
Kevin Blighe41k
Guy's Hospital, London
Kevin Blighe41k wrote:

I am not aware of a way to do this; however, you could simply run --TajimaD multiple times with varying bin size and then find some way to provide a summary function. For example, if you converted your outputs to BED format, you could likely then use BEDTools to summarise the data into a single output. This is experimental, of course.

ADD COMMENTlink written 5 months ago by Kevin Blighe41k
1

Apparently, this can do it: https://vcf-kit.readthedocs.io/en/latest/tajima/

ADD REPLYlink written 5 months ago by Kevin Blighe41k

Thanks a lot, Kevin! I'm working on VCF-kit (I'm having trouble with the installation) and I've also found an R package called PopGenome that calculates several population genomics statistics in sliding windows... Let's see which of both is better ;)

ADD REPLYlink written 5 months ago by sonia.olaechea60

Okay, good luck. Please report back which works best!

ADD REPLYlink written 5 months ago by Kevin Blighe41k
Please log in to add an answer.

Help
Access

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