本文整理汇总了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)