Skip to content

Fix bed_index regression#1975

Merged
jkbonfield merged 3 commits into
samtools:developfrom
daviesrob:bedidx
Jan 23, 2024
Merged

Fix bed_index regression#1975
jkbonfield merged 3 commits into
samtools:developfrom
daviesrob:bedidx

Conversation

@daviesrob

@daviesrob daviesrob commented Jan 23, 2024

Copy link
Copy Markdown
Member

The checks for failure of bed_index() and bed_index_core() were all inverted, causing bed_index() to stop after only processing entries for one reference. This resulted in bed_filter() becoming less efficient on all but the one reference that was indexed; and searches to fail on unsorted BED files.

Fixed by writing the failure tests correctly, and adding a test on unsorted BED inputs.

Fixes #1974

The two inversions cancelled out, with the result that only the
first chromosome in the hash table got sorted and indexed.  This
caused unordered BED files to stop working, and also made lookups
on most chromosomes less efficient.
@daviesrob

Copy link
Copy Markdown
Member Author

NEWS item added...

@jkbonfield jkbonfield merged commit b1f7844 into samtools:develop Jan 23, 2024
@daviesrob daviesrob deleted the bedidx branch January 23, 2024 16:45
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.

samtools view -L with same inputs outputs different reads in 1.19.1 vs 1.19.0

2 participants