Switch alignment validation to after edit construction

This commit is contained in:
Thomas A. Christensen II 2022-12-17 15:00:40 -06:00
parent f9058c5cb3
commit 128a5445ad

View file

@ -263,7 +263,6 @@ function Variant(aln::PairwiseAlignment{T, T}) where {T <: LongSequence{<:Union{
ref = aln.b ref = aln.b
E = eltype(typeof(ref)) E = eltype(typeof(ref))
edits = Edit{T, E}[] edits = Edit{T, E}[]
result = Variant(ref, edits)
refpos = first(aln.a.aln.anchors).refpos refpos = first(aln.a.aln.anchors).refpos
seqpos = first(aln.a.aln.anchors).seqpos seqpos = first(aln.a.aln.anchors).seqpos
markpos = 0 markpos = 0
@ -312,7 +311,7 @@ function Variant(aln::PairwiseAlignment{T, T}) where {T <: LongSequence{<:Union{
end end
end end
return result return Variant(ref, edits)
end end
edits(v::Variant) = v.edits edits(v::Variant) = v.edits