Esempio n. 1
0
 def test_init_degen(self):
     """make_pairs should add in degenerate combinations as weak pairs"""
     p = make_pairs(self.pairs, "AUG", "-", {
         "R": "AG",
         "Y": "CU",
         "W": "AU"
     })
     self.assertNotEqual(p, self.pairs)
     self.pairs.update({
         ("-", "-"): False,
         ("A", "Y"): False,
         ("Y", "A"): False,
         ("A", "W"): False,
         ("W", "A"): False,
         ("U", "R"): False,
         ("R", "U"): False,
         ("U", "W"): False,
         ("W", "U"): False,
         ("G", "Y"): False,
         ("G", "W"): False,
         ("R", "Y"): False,
         ("R", "W"): False,
         ("Y", "R"): False,
         ("Y", "W"): False,
         ("W", "R"): False,
         ("W", "Y"): False,
         ("W", "W"): False,
     })
     self.assertEqual(p, self.pairs)
Esempio n. 2
0
 def test_init_gaps(self):
     """make_pairs should add all combinations of gaps as weak pairs"""
     p = make_pairs(self.pairs, None, "-~")
     self.assertNotEqual(p, self.pairs)
     self.pairs.update(
         {("~", "~"): False, ("-", "~"): False, ("-", "-"): False, ("~", "-"): False}
     )
     self.assertEqual(p, self.pairs)
Esempio n. 3
0
 def test_init_monomers(self):
     """make_pairs with pairs and monomers should equal just the pairs"""
     self.assertEqual(make_pairs(self.pairs, "ABCDEFG"), self.pairs)
     self.assertNotSameObj(make_pairs(self.pairs, "ABCDEFG"), self.pairs)
Esempio n. 4
0
 def test_init_pairs(self):
     """make_pairs with just pairs should equal the original"""
     self.assertEqual(make_pairs(self.pairs), self.pairs)
     self.assertNotSameObj(make_pairs(self.pairs), self.pairs)
Esempio n. 5
0
 def test_init_empty(self):
     """make_pairs should init ok with no parameters"""
     self.assertEqual(make_pairs(), {})