Skip to content

Commit

Permalink
QuickFix: Refactor markovprobability function to assert DNAAlphabet t…
Browse files Browse the repository at this point in the history
…ype consistency in model and sequence
  • Loading branch information
camilogarciabotero committed Dec 9, 2024
1 parent 15778eb commit d918766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transitions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d918766

Please sign in to comment.