From 0b10b9ae7be70140794554bf6d4827e079559b47 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:20:44 -0500 Subject: [PATCH] refactor: Change Edit to abstract type --- src/Edit.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Edit.jl b/src/Edit.jl index cc8e0a7..c9ac5e6 100644 --- a/src/Edit.jl +++ b/src/Edit.jl @@ -9,10 +9,7 @@ An edit of either `Substitution{T}`, `Insertion{S}` or `Deletion` at a position. If deletion: Deletion of length L at ref pos `pos:pos+L-1` If insertion: Insertion of length L b/w ref pos `pos:pos+1` """ -struct Edit{S<:BioSequence,T<:BioSymbol} - x::Union{Substitution{T},Deletion,Insertion{S}} - pos::UInt -end +abstract type Edit{S<:BioSequence,T<:BioSymbol} end Base.length(e::Edit) = length(_mutation(e)) Base.:(==)(e1::Edit, e2::Edit) = e1.pos == e2.pos && e1.x == e2.x