mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-12-22 16:28:17 +00:00
Add function to get variations from variant
This commit is contained in:
parent
dbdc575d75
commit
6d7a93604a
1 changed files with 10 additions and 1 deletions
|
@ -456,12 +456,21 @@ function translate(var::Variation{S, T}, aln::PairwiseAlignment{S, S}) where {S,
|
|||
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,
|
||||
Deletion,
|
||||
Substitution,
|
||||
Variant,
|
||||
Variation,
|
||||
reference,
|
||||
mutation
|
||||
mutation,
|
||||
variations
|
||||
|
||||
end # module
|
||||
|
|
Loading…
Reference in a new issue