File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,17 @@ Base.keys(seq::BioSequence) = eachindex(seq)
4444Base. nextind (:: BioSequence , i:: Integer ) = Int (i) + 1
4545Base. prevind (:: BioSequence , i:: Integer ) = Int (i) - 1
4646Base. size (x:: BioSequence ) = (length (x),)
47- Base. ndims (x:: BioSequence ) = 1
47+ Base. ndims (:: Type{<:BioSequence} ) = 1
48+ Base. ndims (:: T ) where {T<: BioSequence } = 1
49+ Base. IndexStyle (x:: BioSequence ) = Base. IndexStyle (typeof (x))
50+ Base. IndexStyle (:: Type{<:BioSequence} ) = Base. IndexLinear ()
4851Base. eltype (:: Type{<:BioSequence{A}} ) where {A <: Alphabet } = eltype (A)
4952Base. eltype (x:: BioSequence ) = eltype (typeof (x))
50- Alphabet (:: Type{<:BioSequence{A}} ) where {A <: Alphabet } = A ()
51- Alphabet (x:: BioSequence ) = Alphabet (typeof (x))
5253Base. isempty (x:: BioSequence ) = iszero (length (x))
5354Base. empty (:: Type{T} ) where {T <: BioSequence } = T (eltype (T)[])
5455Base. empty (x:: BioSequence ) = empty (typeof (x))
56+ Alphabet (:: Type{<:BioSequence{A}} ) where {A <: Alphabet } = A ()
57+ Alphabet (x:: BioSequence ) = Alphabet (typeof (x))
5558BitsPerSymbol (x:: BioSequence ) = BitsPerSymbol (Alphabet (typeof (x)))
5659
5760function Base. similar (seq:: BioSequence , len:: Integer = length (seq))
You can’t perform that action at this time.
0 commit comments