Skip to content

Fix bed_index_core() handling of overlapping entries#2107

Merged
vasudeva8 merged 1 commit into
samtools:developfrom
daviesrob:nested-bed-entries
Aug 28, 2024
Merged

Fix bed_index_core() handling of overlapping entries#2107
vasudeva8 merged 1 commit into
samtools:developfrom
daviesrob:nested-bed-entries

Conversation

@daviesrob

Copy link
Copy Markdown
Member

It needs to skip if the current entry ends before the previous one, which can happen if the input BED file has entries that are completely contained in an earlier region. Failing to do this could cause last_end to jump backwards, resulting in some incorrect entries being put in the index. This could lead to hits between the end of the innermost and outermost nested BED entries being missed.

Fixes #2104 ("samtools view -L " incomplete output for BED with nested targets)

It needs to skip if the current entry ends before the previous
one, which can happen if the input BED file has entries that
are completely contained in an earlier region.  Failing to
do this could cause last_end to jump backwards, resulting
in some incorrect entries being put in the index.  This could
lead to hits between the end of the innermost and outermost
nested BED entries being missed.

Fixes samtools#2104 ("samtools view -L " incomplete output for BED with
nested targets)
@vasudeva8 vasudeva8 merged commit 9b4d3db into samtools:develop Aug 28, 2024
@daviesrob daviesrob deleted the nested-bed-entries branch August 29, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v19.2/v20 : "samtools view -L " incomplete output for BED with nested targets

2 participants