AndersenLab / VCF-kit

VCF-kit: Assorted utilities for the variant call format
http://www.andersenlab.org
MIT License
122 stars 25 forks source link

KeyError: b'AC' in Tajima'sD calculation #37

Closed mariesaitou closed 3 years ago

mariesaitou commented 3 years ago

Hi, I tried to run the tajima option but keep getting errors.

This is the command I ran: singularity exec vcfkit:0.2.9--pyh5bfb8f1_0 vk tajima 5000 1000 SNV.vcf.gz

And this is the error: CHROM BIN_START BIN_END N_Sites N_SNPs TajimaD Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/vcfkit/tajima.py", line 148, in main() File "/usr/local/lib/python3.6/site-packages/vcfkit/tajima.py", line 144, in main for i in tajima(args[""]).calc_tajima(wz, sz, args["--sliding"], extra=args["--extra"]): File "/usr/local/lib/python3.6/site-packages/vcfkit/tajima.py", line 82, in calc_tajima AC = variant.INFO["AC"] File "cyvcf2/cyvcf2.pyx", line 2138, in cyvcf2.cyvcf2.INFO.getitem KeyError: b'AC'

I am using Singularity so I believe there should not be the python module incompatibility issue... Thank you very much for any help.

mariesaitou commented 3 years ago

https://github.com/AndersenLab/VCF-kit/issues/33

Looks like this.