Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atomize option to bcftools norm removes FORMAT String tags with Number=A #1503

Closed
briankegerreis opened this issue Jun 4, 2021 · 2 comments

Comments

@briankegerreis
Copy link

I have a VCF that includes a String FORMAT tag like this:

##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
##FORMAT=<ID=VF,Number=A,Type=Float,Description="Variant Frequency">
##FORMAT=<ID=STR,Number=A,Type=String,Description="String that goes missing">
#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  sample
chr1    150     .       TAT     CCC     100     PASS    AC=1;AN=2;TYPE=MNP     GT:VF:STR        0/1:0.1:DATA

When I do bcftools norm -a in.vcf, it removes the STR tag. Is this intended behavior, and am I being cavalier with the FORMAT field? TMI: The reason I'm not using INFO/STR is because this feeds into Illumina's hap.py engine, which adds INFO/TRUTH_FMT and INFO/QUERY_FMT for each variant to the output VCF.

Thanks!

@pd3
Copy link
Member

pd3 commented Jun 9, 2021

Uh, string tags defined as Number=A,R,G are not implemented yet, sorry.

These are the places to plug these:

bcftools/abuf.c

Line 304 in 7a530fa

if ( type==BCF_HT_STR && len!=BCF_VL_FIXED && len!=BCF_VL_VAR ) return; // todo: Number=A,R,G for strings

bcftools/abuf.c

Line 452 in 7a530fa

if ( type==BCF_HT_STR && len!=BCF_VL_FIXED && len!=BCF_VL_VAR ) return; // todo: Number=A,R,G for strings

@pd3 pd3 added the enhancement label Jun 9, 2021
@pd3 pd3 closed this as completed in 7e65b25 Jul 11, 2021
@pd3
Copy link
Member

pd3 commented Jul 11, 2021

The support for Number=A,R string annotations has been now added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants