Skip to content

overlapping regions in bcftools annotate #943

@dmckean

Description

@dmckean

Annotating a VCF with a BED that contains overlapping regions only seems to output the first region in the BED. Consider bcftools annotate -a regions.bed.gz -c CHROM,FROM,TO,ABC -h ABC_Tag.txt input.vcf.gz

regions.bed(.gz)

1	1141500	1141520	A
1	1141510	1141600	B

Output

#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
1	1141506	.	G	A	.	PASS	ABC=A
1	1141517	.	C	A	.	PASS	ABC=A
1	1141556	.	G	C	.	PASS	ABC=B
1	1141570	.	G	C	.	PASS	ABC=B
1	1141643	.	T	C	.	PASS	.

If the INFO header has Number=., any ideas for annotating both? I've also messing around in bedtools to form a split version of the bed instead. Something like this, but smart enough to handle more than two overlapping regions.

1	1141500	1141510	A
1	1141510	1141520	A,B
1	1141520	1141600	B

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions