From 3b33c85d00db3437998fdc93075b37399204ff42 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 22 Nov 2022 10:23:34 -0600 Subject: [PATCH] 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. --- src/SequenceVariation.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SequenceVariation.jl b/src/SequenceVariation.jl index c273a02..522a55f 100644 --- a/src/SequenceVariation.jl +++ b/src/SequenceVariation.jl @@ -463,10 +463,10 @@ 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))) +function variations(v::Variant{S,T}) where {S,T} + vs = Vector{Variation{S,T}}(undef, length(edits(v))) for (i, e) in enumerate(edits(v)) - vs[i] = Variation(reference(v), e) + vs[i] = Variation{S,T}(reference(v), e) end return vs end