def test_mfe_fail(self): '''Tests mfe method.''' m_rna = 'GCGGGAATTACACATGGCATGGACGAACTTTATAAATGA' energies, bp_xs, bp_ys = utils.run('mfe', [m_rna], temp=37.0, dangles='none') self.assertEqual(energies, [0.0]) self.assertEqual(bp_xs, [[]]) self.assertEqual(bp_ys, [[]])
def test_subopt_fail(self): '''Tests subopt method.''' r_rna = 'CCC' m_rna = 'CCC' energies, bp_xs, bp_ys = utils.run('subopt', [m_rna, r_rna], temp=37.0, dangles='all', energy_gap=3.0) self.assertEqual(energies, []) self.assertEqual(bp_xs, []) self.assertEqual(bp_ys, [])
def test_subopt(self): '''Tests subopt method.''' r_rna = 'ACCTCCTTA' m_rna = 'AACCTAATTGATAGCGGCCTAGGACCCCCATCAAC' _, _, bp_ys = utils.run('subopt', [m_rna, r_rna], temp=37.0, dangles='all', energy_gap=3.0) nt_in_r_rna = False for bp_y in bp_ys: for nt_y in bp_y: if nt_y > len(m_rna): nt_in_r_rna = True self.assertTrue(nt_in_r_rna)