本文整理汇总了Python中Bio.SeqFeature.SeqFeature.qualifiers["codon_start"]方法的典型用法代码示例。如果您正苦于以下问题:Python SeqFeature.qualifiers["codon_start"]方法的具体用法?Python SeqFeature.qualifiers["codon_start"]怎么用?Python SeqFeature.qualifiers["codon_start"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bio.SeqFeature.SeqFeature
的用法示例。
在下文中一共展示了SeqFeature.qualifiers["codon_start"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: map
# 需要导入模块: from Bio.SeqFeature import SeqFeature [as 别名]
# 或者: from Bio.SeqFeature.SeqFeature import qualifiers["codon_start"] [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()