I need to calculate Tajima's D for vcf data, using a bed file to indicate the windows in which I want to calculate the statistic. I tried to use vcftools like so:
vcftools --gzvcf file.vcf.gz --bed file.bed --TajimaD 500 --stdout > output.txt
However vcftools requires that you indicate the size of the windows for which you wish to calculate the statistic (the
500 above). As such it ends up calculating Tajima's D for each scrolling window, instead of for each of the windows stipulated in my bed file.
Is there anyway to circumvent this, or any tool that is better suited to this task?