本文整理匯總了Python中Bio.Compass類的典型用法代碼示例。如果您正苦於以下問題:Python Compass類的具體用法?Python Compass怎麽用?Python Compass使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Compass類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testCompassIteratorEasy
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()
示例2: testAlignmentParsingTwo
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()
示例3: testCompassScanAndConsume
def testCompassScanAndConsume(self):
cons = Compass._Consumer()
scan = Compass._Scanner()
scan.feed(open(self.test_files[0]), cons)
com_record = cons.data
self.assertEquals("60456.blo.gz.aln", com_record.query)
self.assertEquals("60456.blo.gz.aln", com_record.hit)
self.assertEquals(0.5, com_record.gap_threshold)
self.assertEquals(388, com_record.query_length)
self.assertEquals(386, com_record.query_filtered_length)
self.assertEquals(388, com_record.hit_length)
self.assertEquals(386, com_record.hit_filtered_length)
self.assertEquals(399, com_record.query_nseqs)
self.assertEquals(12.972, com_record.query_neffseqs)
self.assertEquals(399, com_record.hit_nseqs)
self.assertEquals(12.972, com_record.hit_neffseqs)
self.assertEquals(2759, com_record.sw_score)
self.assertEquals(float("0.00e+00"), com_record.evalue)
示例4: testCompassIteratorHard
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()
示例5: testCompassParser
def testCompassParser(self):
handle = open(self.test_files[0])
com_record = Compass.read(handle)
handle.close()
self.assertEqual("60456.blo.gz.aln", com_record.query)