def worker(motif): if self.skip_exact: return 0 try: return self.spatt.get_exact_prob( seq=self.seed.mirna_seq, motif=utils.clean_seq(motif, self.alphabet), nobs=self.seed.target_seq.count(motif), length_seq=self.seed.len_target_seq, alphabet=self.alphabet, transitions=self.transitions, markov_order=self.markov_order, direction='o' ) except AttributeError: return 0
def test_clean_seq(self): dirty = "ATGCPRASHANTAUGC" clean = "AGCAAAUGC" alpha = "AUGC" self.assertEqual(utils.clean_seq(dirty, alpha), clean)