I'm trying to import a fasta sequence using the SeqIO library and i'm having trouble using a method on my sequence - of which I want the console to spit out the resultant mRNA sequence.
- import library: from Bio import SeqIO
- set sequence object: sequence = SeqIO.parse(open(fastaFile),'fasta')
enter the loop in order to access the sequence data (which is now stored as 2 data members .id and .seq in the list/array records): for sequence in record:
This is where i'm having trouble:
>>>for sequence in records: . . . mRNA = record.seq.transcribe() . . . print mRNA
I want to take the data stored in record.id and by using function transcribe(), perform the function and set it equal to a new object value that I can print. Where am I going wrong? Do I need to create a list object mRNA in order to load the record.id?