Opened 9 years ago
Last modified 4 years ago
#774 new discussion
iterate bam file over set of regions
Reported by: | Peter | Owned by: | Peter |
---|---|---|---|
Priority: | major | Milestone: | yat 0.x+ |
Component: | omic | Version: | |
Keywords: | Cc: |
Description
Creating a bam read iterator is relatively expensive because it has to seek the location of the first read (utilizing the index but still). When doing that repeatedly, say to iterate over all exons, it might be cheaper to just read through to the next region rather than create a new BamReadIterator
which seeks the location etc. This depends on how many reads there are between current and next region. The idea here is to have an iterator that reads through the bam file when that is fastest and seeks via the bam index when that is fastest.
Note: See
TracTickets for help on using
tickets.
From htslib v1.7 there is a multi-region iterator: