Merge pull request #10 from MillironX/feature/variation-equality

This commit is contained in:
Thomas A. Christensen II 2022-06-30 17:04:01 -05:00 committed by GitHub
commit 538b612faf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -356,6 +356,8 @@ reference(v::Variation) = v.reference
edit(v::Variation) = v.edit
mutation(v::Variation) = mutation(edit(v))
BioGenerics.leftposition(v::Variation) = leftposition(edit(v))
Base.:(==)(x::Variation, y::Variation) = x.ref == y.ref && x.edit == y.edit
Base.hash(x::Variation, h::UInt) = hash(Variation, hash((x.ref, x.edit), h))
function is_valid(v::Variation)
isempty(v.ref) && return false