我正在寻找伏击终止密码子。我已经得到了我的代码,可以从我的embl文件中提取我需要的序列。然而,我对如何添加两个上游和两个下游核苷酸感到有些困惑,所以我最终得到了 -2、-1、0、1、2 个阅读框。
for rec in SeqIO.parse("CP002701.embl", "embl"):
if rec.features:
for feature in rec.features:
if feature.type == "CDS":
print(feature.location)
print(feature.qualifiers["protein_id"])
print(feature.location.extract(rec).seq)
Run Code Online (Sandbox Code Playgroud)
是我想更改但不确定如何更改.location以选择我感兴趣的额外 4 个碱基的部分。