This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcftools --TajimaD does not start at 0 and misses variants

I have used vcftools --TajimaD to calculate Tajima's D statistics with other species easily in the past. However, I am running this now on a new vcf and getting strange results:

  1. the output file doesn't start at 0, but rather at 539700. There is nothing special about this number. The first variant in the VCF file is at position 36 and so forth. See screenshot below enter image description here enter image description here
  2. also, even for windows where it does make some calculations, it is missing variants that are clearly present in the VCF.

enter image description here

In case its helpful here is vcftools output enter image description here

Indexing the vcf (tabix) did not solve.

Anyone encountered this before?

vcftools tajimad

1 answer

SOLVED:

in the vcf-merge command used to create the vcf file I added --ref-for-missing 0/0

Perhaps vcftools --TajimaD doesn't like having missing values (ie ./.)?

Please accept your answer using the check mark on the left to mark the post as solved.

it gives error "you can not accept your own post"

That's odd. I think it could be a bug with the new site. I'll accept your answer for you and alert the admin to this bug.

Log in to answer this question.