Add function to get variations from variant

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

View file

@ -456,12 +456,21 @@ function translate(var::Variation{S, T}, aln::PairwiseAlignment{S, S}) where {S,
end end
end end
function variations(v::Variant)
vs = Vector{Variation}(undef, length(edits(v)))
for (i, e) in enumerate(edits(v))
vs[i] = Variation(reference(v), e)
end
return vs
end
export Insertion, export Insertion,
Deletion, Deletion,
Substitution, Substitution,
Variant, Variant,
Variation, Variation,
reference, reference,
mutation mutation,
variations
end # module end # module