bcftools annotate picks one attribute but not another
1
0
Entering edit mode
6.4 years ago
Ram 43k

Hello,

I've run into a weird error and would like to figure out what's going on.

I'm annotating a VCF file from a library VCF file using bcftools annotate. I'm picking AC and AF fields from the library VCF file, and annotating them as a modified tag. This works fine for AF, but does not work for AC. My command is:

bcftools annotate -a library.vcf.gz \
-c "INFO/LIB_AC:=INFO/AC" \
-h library.vcfheader \
-Ov  input_vcf

When I substitute all AC above with AF above, annotations happen fine. For the same entry that the AF annotation is seen, AC is not annotated even though the library file has both AC and AF for that matching (CHROM,POS,ID,REF and ALT matching) entry.

What am I missing here? Does bcftools crap out if the annotation sub-tag picked out is the first annotation sub-tag (aka doesn't have a ; in front)?

I'm using bcftools v1.6

EDIT: I ran a few more tests.

I tried another attribute (AN) and it works fine. It's only AC that doesn't. And when I don't do the mapping(not -c INFO/LIB_AC:=INFO/AC, only -c INFO/AC), the AC rightly replaces the AC in my VCF. It's just unable to work in the way specific above. Really specific, really weird.

bcftools annotate vcf • 2.1k views
ADD COMMENT
2
Entering edit mode
6.4 years ago
Ram 43k

Did some more debugging, tried a bunch of changes and this is what worked:

The datatype on the header file was wrong. It was Float instead of Integer, and changing that made it work. Really weird, but I'll stop complaining.

ADD COMMENT

Login before adding your answer.

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