Ejemplo n.º 1
0
 def test_bad_positions(self):
     with self.assertRaisesRegex(ValueError,
                                 "Hit start position is negative"):
         Alignment(self.domain, "A", "B", -1, 10)
     with self.assertRaisesRegex(
             ValueError, "Hit end position is not greater than the start"):
         Alignment(self.domain, "A", "B", 10, 1)
Ejemplo n.º 2
0
 def setUp(self):
     self.domain = PFAMDomain(FeatureLocation(1, 6),
                              "description",
                              protein_start=3,
                              protein_end=5,
                              domain="p450",
                              identifier="PF00001",
                              tool="test")
     self.alignment = Alignment(self.domain, "WLAD-QGAR", "WLaer.rGA", 10,
                                19)
Ejemplo n.º 3
0
class TestAlignment(unittest.TestCase):
    def setUp(self):
        self.domain = DummyPFAMDomain(domain="p450")
        self.alignment = Alignment(self.domain, "WLAD-QGAR", "WLaer.rGA", 10,
                                   19)

    def test_get_signature(self):
        assert self.alignment.get_signature([11, 13, 15]) == "WA-"

    def test_bad_positions(self):
        with self.assertRaisesRegex(ValueError,
                                    "Hit start position is negative"):
            Alignment(self.domain, "A", "B", -1, 10)
        with self.assertRaisesRegex(
                ValueError, "Hit end position is not greater than the start"):
            Alignment(self.domain, "A", "B", 10, 1)
Ejemplo n.º 4
0
class TestAlignment(unittest.TestCase):
    def setUp(self):
        self.domain = PFAMDomain(FeatureLocation(1, 6),
                                 "description",
                                 protein_start=3,
                                 protein_end=5,
                                 domain="p450",
                                 identifier="PF00001",
                                 tool="test")
        self.alignment = Alignment(self.domain, "WLAD-QGAR", "WLaer.rGA", 10,
                                   19)

    def test_get_signature(self):
        assert self.alignment.get_signature([11, 13, 15]) == "WA-"

    def test_bad_positions(self):
        with self.assertRaisesRegex(ValueError,
                                    "Hit start position is negative"):
            Alignment(self.domain, "A", "B", -1, 10)
        with self.assertRaisesRegex(
                ValueError, "Hit end position is not greater than the start"):
            Alignment(self.domain, "A", "B", 10, 1)
Ejemplo n.º 5
0
 def setUp(self):
     self.domain = DummyPFAMDomain(domain="p450")
     self.alignment = Alignment(self.domain, "WLAD-QGAR", "WLaer.rGA", 10,
                                19)