diff --git a/src/bam/overlap.jl b/src/bam/overlap.jl index bb7b3c1..c6cf8ac 100644 --- a/src/bam/overlap.jl +++ b/src/bam/overlap.jl @@ -47,7 +47,7 @@ end function Base.iterate(iter::OverlapIterator) refindex = findfirst(isequal(iter.refname), iter.reader.refseqnames) - if refindex == 0 + if refindex === nothing throw(ArgumentError("sequence name $(iter.refname) is not found in the header")) end @assert iter.reader.index !== nothing