This is a test version of Biostars. For the public version, visit https://www.biostars.org.
[E::vcf_parse_format] Invalid character 'N' in 'AC' FORMAT field

The vcf file produced from SNVer has "NA"s in AC FORMAT field of some samples. Running bcftools with this vcf produces this error. Seems like bcftools is not expecting NA in AC field. Could someone please suggest a solution for this.

bcftools view test.vcf -i NP=8 -o test_NP8.vcf

[E::vcf_parse_format] Invalid character 'N' in 'AC' FORMAT field at scaffold_1:345947
bcftools

1 answer

look at the definition of AC in the header. it should be something like:

##INFO=<ID=AC,Number=A,Type=Integer,Description="Allele count in genotypes for each ALT allele, in the same order as listed">

AC should be an Integer, not a string.

Here is the AC header

FORMAT=<id=ac,number=1,type=integer,description="alternative allele="" count"="">

yeah, so in your VCF you shouldn't find AC=N for scaffold_1:345947

when the DP is 0 the AC field has NA which could be 0. Not sure how to change NA to 0.

Thank you very much. That solved the problem.

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.

Upvote|Bookmark|Accept

Log in to answer this question.