diff --git a/src/SequenceVariation.jl b/src/SequenceVariation.jl index 18db51a..de19df1 100644 --- a/src/SequenceVariation.jl +++ b/src/SequenceVariation.jl @@ -233,6 +233,10 @@ function is_valid(v::Variant) for edit in v.edits pos = edit.pos op = edit.x + # Sanity check: for this to be a valid variant, it must be comprised of valid + # variations + is_valid(Variation(v.ref, edit)) || return false + # For substitutions we simply do not allow another modification of the same base if op isa Substitution pos in valid_positions || return false