mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 21:39:55 +00:00
refactor: Change Edit to abstract type
This commit is contained in:
parent
011651857f
commit
0b10b9ae7b
1 changed files with 1 additions and 4 deletions
|
@ -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 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`
|
If insertion: Insertion of length L b/w ref pos `pos:pos+1`
|
||||||
"""
|
"""
|
||||||
struct Edit{S<:BioSequence,T<:BioSymbol}
|
abstract type Edit{S<:BioSequence,T<:BioSymbol} end
|
||||||
x::Union{Substitution{T},Deletion,Insertion{S}}
|
|
||||||
pos::UInt
|
|
||||||
end
|
|
||||||
|
|
||||||
Base.length(e::Edit) = length(_mutation(e))
|
Base.length(e::Edit) = length(_mutation(e))
|
||||||
Base.:(==)(e1::Edit, e2::Edit) = e1.pos == e2.pos && e1.x == e2.x
|
Base.:(==)(e1::Edit, e2::Edit) = e1.pos == e2.pos && e1.x == e2.x
|
||||||
|
|
Loading…
Reference in a new issue