Add private reference base getter for Deletion

This commit is contained in:
Thomas A. Christensen II 2022-07-11 12:51:13 -05:00
parent c1f47c7b22
commit bc073eaf20
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -472,6 +472,14 @@ function _altbases(s::Substitution, reference::S, pos::UInt) where S <: BioSeque
return S([s.x]) return S([s.x])
end end
function _refbases(d::Deletion, reference::S, pos::UInt) where S <: BioSequence
if pos == 1
return S(reference[UnitRange{Int}(pos, pos+length(d))])
else
return S(reference[UnitRange{Int}(pos-1, pos+length(d)-1)])
end
end
export Insertion, export Insertion,
Deletion, Deletion,
Substitution, Substitution,