From 128a5445ad566ee4c0bf9f9d0331ec1cd1e5e41c Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Sat, 17 Dec 2022 15:00:40 -0600 Subject: [PATCH] Switch alignment validation to after edit construction --- src/SequenceVariation.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SequenceVariation.jl b/src/SequenceVariation.jl index fa6aa2c..067b4ce 100644 --- a/src/SequenceVariation.jl +++ b/src/SequenceVariation.jl @@ -263,7 +263,6 @@ function Variant(aln::PairwiseAlignment{T, T}) where {T <: LongSequence{<:Union{ ref = aln.b E = eltype(typeof(ref)) edits = Edit{T, E}[] - result = Variant(ref, edits) refpos = first(aln.a.aln.anchors).refpos seqpos = first(aln.a.aln.anchors).seqpos markpos = 0 @@ -312,7 +311,7 @@ function Variant(aln::PairwiseAlignment{T, T}) where {T <: LongSequence{<:Union{ end end - return result + return Variant(ref, edits) end edits(v::Variant) = v.edits