[BioPython] Genbank parsing problem and fix

Peter biopython at maubp.freeserve.co.uk
Tue Oct 3 13:33:48 UTC 2006


>> Hi Gemma,
>>
>> I have made your suggested change to biopython/Bio/formatdefs/ 
>> genbank.py as CVS revision 1.10, which should be viewable online soon:
>>
>> http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/ 
>> expressions/genbank.py?cvsroot=biopython

I got the URL right, but I mean to say Bio/expressions/genbank.py (which 
actually has the Martel definition in it) not Bio/formatdefs/genbank.py

Peter wrote:
>> I am curious as to why you are using this code ... 

Gemma replied:
 > I was using the Bio.Genbank module. This is the code I've been using:
 >
 > from Bio import GenBank
 > parser = GenBank.RecordParser(debug_level=2)
 > record = parser.parse(open("test4.txt"))

I would guess you are using BioPython 1.41 (or older) then, as your 
stack trace was indeed using Martel internally.

Recent versions of BioPython (1.42 and later) use a pure python parser 
in Bio.GenBank as the old Martel code didn't scale well with large input 
files (to the point of being almost useless on large genomes).

If you do update your installation, and run into any problems with the 
GenBank parser, please do let us know.

Peter




More information about the Biopython mailing list