Add accessor functions for Variant

This commit is contained in:
Thomas A. Christensen II 2022-06-15 13:45:02 -05:00
parent 89cad0120f
commit dbdc575d75
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -304,6 +304,9 @@ function Variant(aln::PairwiseAlignment{T, T}) where {T <: LongSequence{<:Union{
return result return result
end end
edits(v::Variant) = v.edits
reference(v::Variant) = v.ref
function lendiff(edit::Edit) function lendiff(edit::Edit)
x = edit.x x = edit.x
x isa Substitution ? 0 : (x isa Deletion ? -length(x) : length(x.x)) x isa Substitution ? 0 : (x isa Deletion ? -length(x) : length(x.x))