示例#1
0
 def testConstructWithCustomFile(self):
     scop = Scop(dir_path="SCOP", version="test")
     astral = Astral(
         scop=scop,
         astral_file="SCOP/scopseq-test/astral-scopdom-seqres-all-test.fa")
     self.assertEqual(str(astral.getSeqBySid("d3sdha_")), "AAAAA")
     self.assertEqual(str(astral.getSeqBySid("d4hbib_")), "KKKKK")
示例#2
0
class AstralTests(unittest.TestCase):
    def setUp(self):
        self.scop = Scop(dir_path="SCOP", version="test")
        self.astral = Astral(scop=self.scop, dir_path="SCOP", version="test")

    def testGetSeq(self):
        self.assertEqual(str(self.astral.getSeqBySid("d3sdha_")), "AAAAA")
        self.assertEqual(str(self.astral.getSeqBySid("d4hbib_")), "KKKKK")

        dom = self.scop.getDomainBySid("d3sdha_")
        self.assertEqual(str(self.astral.getSeq(dom)), "AAAAA")

    def testConstructWithCustomFile(self):
        scop = Scop(dir_path="SCOP", version="test")
        astral = Astral(
            scop=scop,
            astral_file="SCOP/scopseq-test/astral-scopdom-seqres-all-test.fa")
        self.assertEqual(str(astral.getSeqBySid("d3sdha_")), "AAAAA")
        self.assertEqual(str(astral.getSeqBySid("d4hbib_")), "KKKKK")

    def testGetDomainsFromFile(self):
        filename = "SCOP/scopseq-test/astral-scopdom-seqres-sel-gs-bib-20-test.id"
        domains = self.astral.getAstralDomainsFromFile(filename)

        self.assertEqual(len(domains), 3)
        self.assertEqual(domains[0].sid, "d3sdha_")
        self.assertEqual(domains[1].sid, "d4hbib_")
        self.assertEqual(domains[2].sid, "d5hbia_")

    def testGetDomainsClustered(self):
        domains1 = self.astral.domainsClusteredById(20)
        self.assertEqual(len(domains1), 3)
        self.assertEqual(domains1[0].sid, "d3sdha_")
        self.assertEqual(domains1[1].sid, "d4hbib_")
        self.assertEqual(domains1[2].sid, "d5hbia_")

        domains2 = self.astral.domainsClusteredByEv(1e-15)
        self.assertEqual(len(domains2), 1)
示例#3
0
class AstralTests(unittest.TestCase):

    def setUp(self):
        self.scop = Scop(dir_path="SCOP", version="test")
        self.astral = Astral(scop=self.scop, dir_path="SCOP", version="test")

    def testGetSeq(self):
        self.assertEqual(str(self.astral.getSeqBySid('d3sdha_')), "AAAAA")
        self.assertEqual(str(self.astral.getSeqBySid('d4hbib_')), "KKKKK")

        dom = self.scop.getDomainBySid('d3sdha_')
        self.assertEqual(str(self.astral.getSeq(dom)), "AAAAA")

    def testConstructWithCustomFile(self):
        scop = Scop(dir_path="SCOP", version="test")
        astral = Astral(scop=scop,
                        astral_file="SCOP/scopseq-test/astral-scopdom-seqres-all-test.fa")
        self.assertEqual(str(astral.getSeqBySid('d3sdha_')), "AAAAA")
        self.assertEqual(str(astral.getSeqBySid('d4hbib_')), "KKKKK")

    def testGetDomainsFromFile(self):
        filename = "SCOP/scopseq-test/astral-scopdom-seqres-sel-gs-bib-20-test.id"
        domains = self.astral.getAstralDomainsFromFile(filename)

        self.assertEqual(len(domains), 3)
        self.assertEqual(domains[0].sid, "d3sdha_")
        self.assertEqual(domains[1].sid, "d4hbib_")
        self.assertEqual(domains[2].sid, "d5hbia_")

    def testGetDomainsClustered(self):
        domains1 = self.astral.domainsClusteredById(20)
        self.assertEqual(len(domains1), 3)
        self.assertEqual(domains1[0].sid, "d3sdha_")
        self.assertEqual(domains1[1].sid, "d4hbib_")
        self.assertEqual(domains1[2].sid, "d5hbia_")

        domains2 = self.astral.domainsClusteredByEv(1e-15)
        self.assertEqual(len(domains2), 1)
示例#4
0
 def setUp(self):
     self.scop = Scop(dir_path="SCOP", version="test")
     self.astral = Astral(scop=self.scop, dir_path="SCOP", version="test")
示例#5
0
 def testConstructWithCustomFile(self):
     scop = Scop(dir_path="SCOP", version="test")
     astral = Astral(scop=scop,
                     astral_file="SCOP/scopseq-test/astral-scopdom-seqres-all-test.fa")
     self.assertEqual(str(astral.getSeqBySid('d3sdha_')), "AAAAA")
     self.assertEqual(str(astral.getSeqBySid('d4hbib_')), "KKKKK")
示例#6
0
 def setUp(self):
     self.scop = Scop(dir_path="SCOP", version="test")
     self.astral = Astral(scop=self.scop, dir_path="SCOP", version="test")