From Biopython
Revision as of 14:13, 29 May 2007 by Dalloliogm (Talk | contribs)
Jump to: navigation, search

Hi, I am a newbie of Biopython. I tested Bio.SeqIO.parse on EMBL formated miRNA.dat from the microRNA Registry. But I got an error. Is the EMBL format supported fully? As:

>>>from Bio import SeqIO >>>handle = open('/home/liang/Desktop/miRNA.dat','rU') >>>record_iterator = SeqIO.parse(handle,'embl') >>> Traceback (most recent call last):

 File "<stdin>", line 1, in <module>
 File "/usr/lib/python2.5/site-packages/Bio/GenBank/", line 410, in parse_records
   record = self.parse(handle)
 File "/usr/lib/python2.5/site-packages/Bio/GenBank/", line 393, in parse
   if self.feed(handle, consumer) :
 File "/usr/lib/python2.5/site-packages/Bio/GenBank/", line 360, in feed
   self._feed_first_line(consumer, self.line)
 File "/usr/lib/python2.5/site-packages/Bio/GenBank/", line 540, in _feed_first_line
   assert len(fields) == 7


  • Questions like this will probably be answered faster if you post them to the BioPython mail list. --Cjfields 16:03, 23 May 2007 (EDT)

SeqIO.to_dict() - how to specify SeqRecord Alphabet

Hi, nice work with this module!

The to_dict() method creates a dictionary with biopython SeqRecord objects.

- record_dict = SeqIO.to_dict(SeqIO.parse(handle, "fasta"))

How can I specify which Alphabet do they must have?

Personal tools