当前位置: 首页>>代码示例>>Python>>正文


Python Bio.Compass类代码示例

本文整理汇总了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()
开发者ID:Benjamin-Lee,项目名称:biopython,代码行数:7,代码来源:test_Compass.py

示例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()
开发者ID:Benjamin-Lee,项目名称:biopython,代码行数:8,代码来源:test_Compass.py

示例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)
开发者ID:andyoberlin,项目名称:biopython,代码行数:23,代码来源:test_Compass.py

示例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()
开发者ID:Benjamin-Lee,项目名称:biopython,代码行数:17,代码来源:test_Compass.py

示例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)
开发者ID:Benjamin-Lee,项目名称:biopython,代码行数:6,代码来源:test_Compass.py


注:本文中的Bio.Compass类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。