From fe1bbcc0f37b02967e01957533a0022e9b9a3f0b Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:34:50 -0500 Subject: [PATCH] Add hash function for Variation --- src/SequenceVariation.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SequenceVariation.jl b/src/SequenceVariation.jl index c00d210..a3847ba 100644 --- a/src/SequenceVariation.jl +++ b/src/SequenceVariation.jl @@ -357,6 +357,7 @@ 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