From d91876682167426ad39f72d1b44540ef8137bcd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilo=20Garc=C3=ADa?= Date: Mon, 9 Dec 2024 00:48:47 -0500 Subject: [PATCH] QuickFix: Refactor markovprobability function to assert DNAAlphabet type consistency in model and sequence --- src/transitions.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transitions.jl b/src/transitions.jl index 90bf9f4..4b7a1f2 100644 --- a/src/transitions.jl +++ b/src/transitions.jl @@ -259,8 +259,8 @@ function markovprobability( seq::NucleicSeqOrView{A}; model::BioMarkovChain{A}=ECOLICDS, logscale::Bool=true -) where {A<:NucleicAcidAlphabet} - @assert Alphabet(model) == Alphabet(seq) "Sequence and model state space are inconsistent." +) where {A<:DNAAlphabet} + @assert eltype(model) == eltype(seq) "Sequence and model state space are inconsistent." init = logscale ? log2(model.inits[_dna_to_int(seq[1])]) : model.inits[_dna_to_int(seq[1])] probability = init