mirror of
https://github.com/MillironX/XAM.jl.git
synced 2024-11-14 14:23:11 +00:00
Add eof
check
The addition of an eof check appears to cover a corner case detailed at https://github.com/BioJulia/XAM.jl/issues/31#issuecomment-787480072.
This commit is contained in:
parent
0e6ef62e3e
commit
055c36408c
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ end
|
|||
function Base.iterate(iter::OverlapIterator, state)
|
||||
while state.chunkid ≤ lastindex(state.chunks)
|
||||
chunk = state.chunks[state.chunkid]
|
||||
while BGZFStreams.virtualoffset(iter.reader.stream) < chunk.stop
|
||||
while !eof(iter.reader) && BGZFStreams.virtualoffset(iter.reader.stream) < chunk.stop
|
||||
read!(iter.reader, state.record)
|
||||
c = compare_intervals(state.record, (state.refindex, iter.interval))
|
||||
if c == 0
|
||||
|
|
Loading…
Reference in a new issue