mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 21:39:55 +00:00
Add type parameterization to variations getter
I have encountered some cases where having a non-parameterized vector can crash a downstream process. I don't yet know how to make a MWE of that, but adding type parameters fixes my problem, and doesn't break any tests here.
This commit is contained in:
parent
752b482a0b
commit
3b33c85d00
1 changed files with 3 additions and 3 deletions
|
@ -463,10 +463,10 @@ function translate(var::Variation{S, T}, aln::PairwiseAlignment{S, S}) where {S,
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function variations(v::Variant)
|
function variations(v::Variant{S,T}) where {S,T}
|
||||||
vs = Vector{Variation}(undef, length(edits(v)))
|
vs = Vector{Variation{S,T}}(undef, length(edits(v)))
|
||||||
for (i, e) in enumerate(edits(v))
|
for (i, e) in enumerate(edits(v))
|
||||||
vs[i] = Variation(reference(v), e)
|
vs[i] = Variation{S,T}(reference(v), e)
|
||||||
end
|
end
|
||||||
return vs
|
return vs
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue