I'm looking for ambush stop codons. I've gotten my code to the point where I'm extracting the sequences I need from my embl
files. However I'm a bit stumped on how to add two upstream and two downstream nucleotides so I end up having -2,-1, 0, 1, 2 reading frames.
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)
is the section I want to change but not sure how to change .location
in order to select the extra 4 bases that I am interested in.