vcftools --TajimaD in sliding windows
2
1
Entering edit mode
6.1 years ago
biosol ▴ 170

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!

vcftools SNP Tajima's D • 7.8k views
ADD COMMENT
1
Entering edit mode
6.1 years ago
biosol ▴ 170

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 COMMENT
0
Entering edit mode
6.1 years ago

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 COMMENT
1
Entering edit mode
ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1855 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