mirror of
https://github.com/MillironX/XAM.jl.git
synced 2024-11-14 22:33:14 +00:00
Flatten
This commit is contained in:
parent
6a33ac06a7
commit
f272b41031
1 changed files with 7 additions and 7 deletions
|
@ -321,15 +321,15 @@ function alignlength(record::Record)::Int
|
||||||
len = 0 # operation length
|
len = 0 # operation length
|
||||||
for i in record.cigar
|
for i in record.cigar
|
||||||
c = record.data[i]
|
c = record.data[i]
|
||||||
if c ∈ UInt8('0'):UInt8('9')
|
if in(c, UInt8('0'):UInt8('9'))
|
||||||
len = len * 10 + (c - UInt8('0'))
|
len = len * 10 + (c - UInt8('0'))
|
||||||
else
|
continue
|
||||||
op = convert(BioAlignments.Operation, Char(c))
|
|
||||||
if BioAlignments.ismatchop(op) || BioAlignments.isdeleteop(op)
|
|
||||||
ret += len
|
|
||||||
end
|
|
||||||
len = 0
|
|
||||||
end
|
end
|
||||||
|
op = convert(BioAlignments.Operation, Char(c))
|
||||||
|
if BioAlignments.ismatchop(op) || BioAlignments.isdeleteop(op) #Note: reference consuming ops ('M', 'D', 'N', '=', 'X').
|
||||||
|
ret += len
|
||||||
|
end
|
||||||
|
len = 0
|
||||||
end
|
end
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue