def worker(motif): return sum([ 1.0, -1 * binom_cdf( self.seed.target_seq.count(motif), self.seed.len_target_seq - len(motif) + 1, prob.prob_motif( motif, self.alphabet, self.markov_order, self.transitions ) ) ])
def test_prob_motif(self): seq = "AUGC" alp = ["A", "U", "G", "C"] t = prob.get_transitions(seq, alp, 1) self.assertEqual(prob.prob_motif("AU", alp, 2, t), 1.0)