[E::vcf_parse_format] Invalid character 'N' in 'AC' FORMAT field
1
0
Entering edit mode
5.6 years ago

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 • 2.7k views
ADD COMMENT
2
Entering edit mode
5.6 years ago

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.

ADD COMMENT
0
Entering edit mode

Here is the AC header

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

something like sed 's/AC=NA/AC=0/g'

ADD REPLY
0
Entering edit mode

Thank you very much. That solved the problem.

ADD REPLY
1
Entering edit mode

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

Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

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