Ejemplo n.º 1
0
    def testCompassIteratorEasy(self):
        records = Compass.parse(open(self.test_files[0]))

        com_record = records.next()
        self.assertEqual("60456.blo.gz.aln", com_record.query)

        self.assertRaises(StopIteration, records.next)
Ejemplo n.º 2
0
 def testAlignmentParsingTwo(self):
     records = Compass.parse(open(self.test_files[0]))
     
     com_record = records.next()
     self.assertEqual(2, com_record.query_start)
     self.assertEqual(2, com_record.hit_start)
     self.assertEqual("LKERKL", com_record.hit_aln[-6:])
Ejemplo n.º 3
0
 def testCompassIteratorEasy(self):
     handle = open(self.test_files[0])
     records = Compass.parse(handle)
     com_record = next(records)
     self.assertEqual("60456.blo.gz.aln", com_record.query)
     self.assertRaises(StopIteration, next, records)
     handle.close()
Ejemplo n.º 4
0
 def testAlignmentParsingTwo(self):
     with open(self.test_files[0]) as handle:
         records = Compass.parse(handle)
         com_record = next(records)
     self.assertEqual(2, com_record.query_start)
     self.assertEqual(2, com_record.hit_start)
     self.assertEqual("LKERKL", com_record.hit_aln[-6:])
Ejemplo n.º 5
0
 def testCompassIteratorEasy(self):
     handle = open(self.test_files[0])
     records = Compass.parse(handle)
     com_record = next(records)
     self.assertEqual("60456.blo.gz.aln", com_record.query)
     self.assertRaises(StopIteration, next, records)
     handle.close()
Ejemplo n.º 6
0
 def testAlignmentParsingTwo(self):
     handle = open(self.test_files[0])
     records = Compass.parse(handle)
     com_record = next(records)
     self.assertEqual(2, com_record.query_start)
     self.assertEqual(2, com_record.hit_start)
     self.assertEqual("LKERKL", com_record.hit_aln[-6:])
     handle.close()
Ejemplo n.º 7
0
 def testAlignmentParsingTwo(self):
     handle = open(self.test_files[0])
     records = Compass.parse(handle)
     com_record = records.next()
     self.assertEqual(2, com_record.query_start)
     self.assertEqual(2, com_record.hit_start)
     self.assertEqual("LKERKL", com_record.hit_aln[-6:])
     handle.close()
Ejemplo n.º 8
0
    def testCompassIteratorHard(self):
        records = Compass.parse(open(self.test_files[1]))

        com_record = records.next()
        self.assertEqual("allscop//14982.blo.gz.aln", com_record.hit)
        self.assertEqual(float('1.01e+03'), com_record.evalue)
        
        com_record = records.next()
        self.assertEqual("allscop//14983.blo.gz.aln", com_record.hit)
        self.assertEqual(float('1.01e+03'), com_record.evalue)
                                      
        com_record = records.next()
        self.assertEqual("allscop//14984.blo.gz.aln", com_record.hit)
        self.assertEqual(float('5.75e+02'), com_record.evalue)
Ejemplo n.º 9
0
    def testCompassIteratorHard(self):
        with open(self.test_files[1]) as handle:
            records = Compass.parse(handle)

            com_record = next(records)
            self.assertEqual("allscop//14982.blo.gz.aln", com_record.hit)
            self.assertEqual(float("1.01e+03"), com_record.evalue)

            com_record = next(records)
            self.assertEqual("allscop//14983.blo.gz.aln", com_record.hit)
            self.assertEqual(float("1.01e+03"), com_record.evalue)

            com_record = next(records)
            self.assertEqual("allscop//14984.blo.gz.aln", com_record.hit)
            self.assertEqual(float("5.75e+02"), com_record.evalue)
Ejemplo n.º 10
0
    def testAlignmentParsingOne(self):
        records = Compass.parse(open(self.test_files[1]))

        com_record = records.next()
        self.assertEqual(178, com_record.query_start)
        self.assertEqual("KKDLEEIAD", com_record.query_aln)
        self.assertEqual(9, com_record.hit_start)
        self.assertEqual("QAAVQAVTA", com_record.hit_aln)
        self.assertEqual("++ ++++++", com_record.positives)
        
        com_record = records.next()
        com_record = records.next()
        self.assertEqual(371, com_record.query_start)
        self.assertEqual("LEEAMDRMER~~~V", com_record.query_aln)
        self.assertEqual(76, com_record.hit_start)
        self.assertEqual("LQNFIDQLDNpddL", com_record.hit_aln)
        self.assertEqual("+ ++++ + +   +", com_record.positives)
Ejemplo n.º 11
0
    def testCompassIteratorHard(self):
        handle = open(self.test_files[1])
        records = Compass.parse(handle)

        com_record = next(records)
        self.assertEqual("allscop//14982.blo.gz.aln", com_record.hit)
        self.assertEqual(float('1.01e+03'), com_record.evalue)

        com_record = next(records)
        self.assertEqual("allscop//14983.blo.gz.aln", com_record.hit)
        self.assertEqual(float('1.01e+03'), com_record.evalue)

        com_record = next(records)
        self.assertEqual("allscop//14984.blo.gz.aln", com_record.hit)
        self.assertEqual(float('5.75e+02'), com_record.evalue)

        handle.close()
Ejemplo n.º 12
0
    def testCompassIteratorHard(self):
        handle = open(self.test_files[1])
        records = Compass.parse(handle)

        com_record = next(records)
        self.assertEqual("allscop//14982.blo.gz.aln", com_record.hit)
        self.assertEqual(float('1.01e+03'), com_record.evalue)

        com_record = next(records)
        self.assertEqual("allscop//14983.blo.gz.aln", com_record.hit)
        self.assertEqual(float('1.01e+03'), com_record.evalue)

        com_record = next(records)
        self.assertEqual("allscop//14984.blo.gz.aln", com_record.hit)
        self.assertEqual(float('5.75e+02'), com_record.evalue)

        handle.close()
Ejemplo n.º 13
0
    def testAlignmentParsingOne(self):
        with open(self.test_files[1]) as handle:
            records = Compass.parse(handle)

            com_record = next(records)
            self.assertEqual(178, com_record.query_start)
            self.assertEqual("KKDLEEIAD", com_record.query_aln)
            self.assertEqual(9, com_record.hit_start)
            self.assertEqual("QAAVQAVTA", com_record.hit_aln)
            self.assertEqual("++ ++++++", com_record.positives)

            com_record = next(records)
            com_record = next(records)
            self.assertEqual(371, com_record.query_start)
            self.assertEqual("LEEAMDRMER~~~V", com_record.query_aln)
            self.assertEqual(76, com_record.hit_start)
            self.assertEqual("LQNFIDQLDNpddL", com_record.hit_aln)
            self.assertEqual("+ ++++ + +   +", com_record.positives)