update FMT/GT in VCF file using bcftools annotate
1
0
Entering edit mode
6 months ago
karen2 • 0

Hi - I am trying to use bcftools to overwrite the existing FMT/GT values in a VCF file, matching by the ID column, in addition to CHROM and POS.

I tried creating a .txt.gz file as an annotation file, but got a message that to update the FMT/GT values, I must use a VCF as my annotation file. I have done this, and then I am using:

bcftools1.18 annotate -a annotest.vcf.gz -c ~ID,FMT/GT -O z -o new.vcf.gz original.vcf.gz

When I do this, I get a note that says:

"todo: -c ~ID with -a VCF?"

Does this means that bcftools does not allow me to update FMT/GT using the ID column?

Thanks in advance!

bcftools annotate VCF • 383 views
ADD COMMENT
0
Entering edit mode
6 months ago

the message is here

https://github.com/samtools/bcftools/blob/develop/vcfannotate.c#L2236

where tgts_is_vcf is set here https://github.com/samtools/bcftools/blob/develop/vcfannotate.c#L3512 when the annotation format is a VCF

   if ( type.format==vcf || type.format==bcf )
        {
            args->tgts_is_vcf = 1;

so the syntax using '~ID' only works with tabix indexed files, not VCF

ADD COMMENT

Login before adding your answer.

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