bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

Annotate fail to add INFO when match structural variation by POS,~ID,REF,ALT

Open Han-Cao opened this issue 2 years ago • 3 comments

Hi,

I am using bcftools 1.15.1. I want to add INFO for a vcf file of structural variations. The vcf is like:

chr1	10627	ID1	N	<INS>	.	PASS	some_INFO
chr1	90238	ID2	N	<INS>	.	PASS	some_INFO
chr1	90337	ID3	N	<INS>	.	PASS	some_INFO
chr1	90388	ID4	N	<INS>	.	PASS	some_INFO
chr1	90412	ID5	N	<INS>	.	PASS	some_INFO
chr1	90416	ID6	N	<INS>	.	PASS	some_INFO

The annotation file is like:

chr1	10627	ID1	N	<INS>	-0.999642
chr1	90238	ID2	N	<INS>	1.25927
chr1	90337	ID3	N	<INS>	1.42278
chr1	90388	ID4	N	<INS>	1.14841
chr1	90412	ID5	N	<INS>	1.19886
chr1	90416	ID6	N	<INS>	-0.556859

When I first try to annotate by POS,~ID,REF,ALT suggested by the manual (bcftools annotate -a annots.tab.gz -c CHROM,POS,~ID,REF,ALT,INFO/VAL input.vcf), no value can be added to the INFO.

However, after I remove the REF and ALT columns in the annotation file and annotate by -c CHROM,POS,~ID,INFO/VAL, I can get the expected output.

By the way, I first try to annotate from vcf, where I found todo: -c ~ID with -a VCF?, does it mean this feature is on the todo list and currently we can only annotate by tsv file?

Thanks, Han

Han-Cao avatar Jun 22 '22 03:06 Han-Cao

Hi, yes, that's correct. This has not been done for the case when annotating from a VCF yet

pd3 avatar Aug 15 '22 08:08 pd3