當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。