samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
649 stars 240 forks source link

bcftools 1.19 - consensus - different warnings for overlapping variants #2058

Closed salvatoreloguercio closed 8 months ago

salvatoreloguercio commented 8 months ago

Hello,

I am running bcftools consensus on a series of genomic regions (fasta), by applying variants from a single subject and getting IUPAC codes as output ( -s -H I ).

For overlapping variants, now I am getting two kinds of warnings - 1) "The site chr[..]:[..] overlaps with another variant, skipping..." and 2) "Warning: ignoring overlapping variant starting at chr[..]:[...]"

More specifically, suppose I have two regions - chr1:100-200, and chr1:300-400 (just using these small coords as example):

In this example, the vcf used for both regions would be the same and have variants spanning both intervals (chr1:100-400).

I am used to the warning 1) since previous versions of bcftools, but kind of confused by the warning 2) - since it considers earlier variants.

Just wondering if you have an explanation for this behavior - hopefully not a bug?

pd3 commented 8 months ago

The two warnings are emitted from two slightly different contexts. The code is a bit opaque, so it's hard to tell without seeing specific examples, but the difference should be harmless.