1
0
Fork 0
mirror of https://github.com/MillironX/XAM.jl.git synced 2024-11-23 02:09:55 +00:00

Flatten elseif

This commit is contained in:
Ciarán O'Mara 2020-02-02 21:32:02 +11:00
parent ef99c70317
commit 789cccbaff
3 changed files with 6 additions and 6 deletions

View file

@ -67,7 +67,8 @@ function Base.iterate(iter::OverlapIterator, state)
c = compare_intervals(state.record, (state.refindex, iter.interval))
if c == 0
return copy(state.record), state
elseif c > 0
end
if c > 0
# no more overlapping records in this chunk since records are sorted
break
end

View file

@ -30,10 +30,8 @@ end
function Reader(input::IO; index=nothing)
if isa(index, AbstractString)
index = BAI(index)
else
if index != nothing
error("unrecognizable index argument")
end
elseif index != nothing
error("unrecognizable index argument")
end
reader = init_bam_reader(input)
reader.index = index

View file

@ -163,7 +163,8 @@ function checked_refid(record::Record)
id = refid(record)
if id == 0
throw(ArgumentError("record is not mapped"))
elseif !isdefined(record, :reader)
end
if !isdefined(record, :reader)
throw(ArgumentError("reader is not defined"))
end
return id