mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 13:29:56 +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
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue