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


Python SeqFeature.qualifiers["product"]方法代码示例

本文整理汇总了Python中Bio.SeqFeature.SeqFeature.qualifiers["product"]方法的典型用法代码示例。如果您正苦于以下问题:Python SeqFeature.qualifiers["product"]方法的具体用法?Python SeqFeature.qualifiers["product"]怎么用?Python SeqFeature.qualifiers["product"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bio.SeqFeature.SeqFeature的用法示例。


在下文中一共展示了SeqFeature.qualifiers["product"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: map

# 需要导入模块: from Bio.SeqFeature import SeqFeature [as 别名]
# 或者: from Bio.SeqFeature.SeqFeature import qualifiers["product"] [as 别名]
    count = 0;
    for line in orf_tb_file:
        count += 1;
        cds_num = map(int, line.split('\t'))
        cds_seq = seq_record.seq[cds_num[1] - 1:cds_num[2]]
        std = 1
        if cds_num[0] < 0:
            cds_seq = cds_seq.reverse_complement()
            std = -1
            
        cds_translate = str(cds_seq.translate())
        cds_translate = cds_translate[0:len(cds_translate)-1]
        cds_feature = SeqFeature(FeatureLocation(cds_num[1] - 1, cds_num[2], strand = std), type = "CDS")
        cds_feature.qualifiers["locus_tag"] = ['BSNPV' + str(count).zfill(3)]
        cds_feature.qualifiers["codon_start"] = ['1']
        cds_feature.qualifiers["product"] = ['unknown']
        cds_feature.qualifiers["note"] = ['unknown']
        cds_feature.qualifiers["db_xref"] = ['GI:100000' + str(count).zfill(3)]
        cds_feature.qualifiers["translation"] = [cds_translate]
        cds_feature.qualifiers["protein_id"] = ['LP_100000' + str(count).zfill(3)]
        
        seq_record.features.append(cds_feature)
        
    gb_record.append(seq_record)
    
SeqIO.write(gb_record, gb_gn_file, "genbank")

fas_gn_file.close()
orf_tb_file.close()
gb_gn_file.close()  
        
开发者ID:lijax,项目名称:bioscript,代码行数:32,代码来源:fas_orf2fake_gb.py


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