mirror of
https://github.com/MillironX/XAM.jl.git
synced 2024-11-23 10:19:56 +00:00
Flatten elseif
This commit is contained in:
parent
ef99c70317
commit
789cccbaff
3 changed files with 6 additions and 6 deletions
|
@ -67,7 +67,8 @@ function Base.iterate(iter::OverlapIterator, state)
|
||||||
c = compare_intervals(state.record, (state.refindex, iter.interval))
|
c = compare_intervals(state.record, (state.refindex, iter.interval))
|
||||||
if c == 0
|
if c == 0
|
||||||
return copy(state.record), state
|
return copy(state.record), state
|
||||||
elseif c > 0
|
end
|
||||||
|
if c > 0
|
||||||
# no more overlapping records in this chunk since records are sorted
|
# no more overlapping records in this chunk since records are sorted
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
|
@ -30,11 +30,9 @@ end
|
||||||
function Reader(input::IO; index=nothing)
|
function Reader(input::IO; index=nothing)
|
||||||
if isa(index, AbstractString)
|
if isa(index, AbstractString)
|
||||||
index = BAI(index)
|
index = BAI(index)
|
||||||
else
|
elseif index != nothing
|
||||||
if index != nothing
|
|
||||||
error("unrecognizable index argument")
|
error("unrecognizable index argument")
|
||||||
end
|
end
|
||||||
end
|
|
||||||
reader = init_bam_reader(input)
|
reader = init_bam_reader(input)
|
||||||
reader.index = index
|
reader.index = index
|
||||||
return reader
|
return reader
|
||||||
|
|
|
@ -163,7 +163,8 @@ function checked_refid(record::Record)
|
||||||
id = refid(record)
|
id = refid(record)
|
||||||
if id == 0
|
if id == 0
|
||||||
throw(ArgumentError("record is not mapped"))
|
throw(ArgumentError("record is not mapped"))
|
||||||
elseif !isdefined(record, :reader)
|
end
|
||||||
|
if !isdefined(record, :reader)
|
||||||
throw(ArgumentError("reader is not defined"))
|
throw(ArgumentError("reader is not defined"))
|
||||||
end
|
end
|
||||||
return id
|
return id
|
||||||
|
|
Loading…
Reference in a new issue