Hi all!
I'm having problems using Biopython to translate sequences into all 3 forward reading frames.
I wrote this script (and it works):
######################
#!/bin/python
#translate dna to protein
from Bio import SeqIO
input = open("input.fasta", "rU")
for record in SeqIO.parse(input, "fasta") :
protein_id = record.id
print(">" + protein_id)
print(record.seq.translate(to_stop=True))
input.close()
#########################
But this only gives me the default reading frame. After extensive searching, I still can't find how I edit the script so I can translate the +2 and +3 frames also.
Any help? Thanks!
I'm having problems using Biopython to translate sequences into all 3 forward reading frames.
I wrote this script (and it works):
######################
#!/bin/python
#translate dna to protein
from Bio import SeqIO
input = open("input.fasta", "rU")
for record in SeqIO.parse(input, "fasta") :
protein_id = record.id
print(">" + protein_id)
print(record.seq.translate(to_stop=True))
input.close()
#########################
But this only gives me the default reading frame. After extensive searching, I still can't find how I edit the script so I can translate the +2 and +3 frames also.
Any help? Thanks!
Comment