from Bio.Seq import Seq              
from Bio.Alphabet import generic_rna 
with open('sampledata.txt','r') as f:
    data = f.read()                  
rnaseq = Seq(data, generic_rna)      
protein = rnaseq.translate()         
print(protein)                       
I think this approach was a lot faster than if I had set to write this program from scratch. At this point I feel like I have a good grasp of the basics of Python, and I will continue working more with Biopython when applicable. 
No comments:
Post a Comment