當前位置: 首頁>>代碼示例>>Python>>正文


Python ScreedDB.itervalues方法代碼示例

本文整理匯總了Python中screed.ScreedDB.itervalues方法的典型用法代碼示例。如果您正苦於以下問題:Python ScreedDB.itervalues方法的具體用法?Python ScreedDB.itervalues怎麽用?Python ScreedDB.itervalues使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在screed.ScreedDB的用法示例。


在下文中一共展示了ScreedDB.itervalues方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: range

# 需要導入模塊: from screed import ScreedDB [as 別名]
# 或者: from screed.ScreedDB import itervalues [as 別名]
            for i in range(0, len(str(virus_seq))):
                if str(read[i]) != str(virus_seq[i]):
                    mismatch_count += 1
                elif mismatch_count > k:
                    break
            return mismatch_count
                

            # EXAMPLE:

            #   CGTAGCGATAGAGAGAGAAGGGACT 
            #   CTGAG

birnaxrecords = []
a=0
for record in birna_x_virusdb.itervalues():
    birnaxrecords.append(record)
    #print "\nPrinting added record\n"
    #print record['sequence']
    birnaxrecords[a]['sequence'] = str(record['sequence'])
    a+=1

print birnaxrecords
#typing: $ records
#   PRODUCES: [{'description': 'Drosophila melanogaster birnavirus SW-2009a strain DBV segment A, complete sequence', 'id': 0, 'name': 'gi|262225302|gb|GQ342962.1|', 'sequence': <_screed_attr 'sequence'>}, {'description': 'Drosophila melanogaster birnavirus SW-2009a strain DBV segment B, complete sequence', 'id': 1, 'name': 'gi|262225305|gb|GQ342963.1|', 'sequence': <_screed_attr 'sequence'>}]
#len(record['sequence'])
#   3014
#record['sequence']
#   <_screed_attr 'sequence'>
print "\n\n\n"
#print "Printing a count: all birna records (should equal to 2)...\n"
開發者ID:NacroKill,項目名稱:dmel-ercc-diff,代碼行數:33,代碼來源:Tophat_Birnavirus_Confirmer_2.0.py


注:本文中的screed.ScreedDB.itervalues方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。