Beispiel #1
0
 def test_p450(self, mocked_get, mocked_match):
     mocked_match.return_value = True
     for char in string.ascii_uppercase:
         mocked_get.return_value = [DummyAlignment(char, {407: char})]
         pairings = analysis.asp_p450_oxy(self.record)
         assert pairings == [(char, "active site cysteine present: %s" % (char == "C"))]
     # and an inconclusive
     mocked_match.return_value = False
     # values here don't matter
     mocked_get.return_value = [DummyAlignment("incon", {})]
     pairings = analysis.asp_p450_oxy(self.record)
     assert pairings == [("incon", "active site cysteine inconclusive")]
 def test_p450(self):
     with umock.patch.object(active_site_finder.common.ActiveSiteAnalysis, "scaffold_matches") as mocked_match:
         mocked_match.return_value = True
         for char in string.ascii_uppercase:
             mock("active_site_finder.common.ActiveSiteAnalysis.get_alignments",
                  returns=[DummyAlignment(char, {407: char})])
             pairings = analysis.asp_p450_oxy(self.record)
             assert pairings == [(char, "active site cysteine present: %s" % (char == "C"))]
         # and an inconclusive
         mocked_match.return_value = False
         # values here don't matter
         mock("active_site_finder.common.ActiveSiteAnalysis.get_alignments",
              returns=[DummyAlignment("incon", {})])
         pairings = analysis.asp_p450_oxy(self.record)
         assert pairings == [("incon", "active site cysteine inconclusive")]
Beispiel #3
0
 def test_p450(self):
     mock("subprocessing.run_hmmpfam2",
          returns=parse_hmmpfam_results("p450.output"))
     results = analysis.asp_p450_oxy(self.record)
     expected = {
         'PFAM_p450_0': 'active site cysteine inconclusive',
         'PFAM_p450_1': 'active site cysteine inconclusive'
     }
     assert {dom.domain_id: message for dom, message in results} == expected