[BioPython] Why would this GenBank file choke the GB parser?

Peter biopython at maubp.freeserve.co.uk
Fri Aug 26 05:01:09 EDT 2005


Chris Lasher wrote:
 > Hello,
 >
 > I have a GenBank file, accession AY499671.gb, and 21 like it that I
 > would like to process through BioPython (I am using BioPython 1.40b
 > with Windows), but I am encountering trouble....

Hi Chris,

Looking at your GenBank files by eye, I didn't spot anything "wrong" 
except I note there is a blank final line which has caused trouble in 
the past:

http://www.biopython.org/pipermail/biopython/2005-April/002607.html

Could you edit the GenBank file by hand to confirm this is the problem?

I don't know if a fix for this was ever made... it should just be a 
small tweak to the GenBank file format definition for the Martel parser.

-----------------------------------------------------------------------

Alternatively, I'm using a different GenBank parser (in order to cope 
with much larger GenBank files) and this works fine with your example 
(attached to previous email).

You could try the patch on this bug to see if it solves your problem:

http://bugzilla.open-bio.org/show_bug.cgi?id=1747

If you have trouble with the patch file, I can send you a modified 
version of the Bio/GenBank/__init__.py file which you can use to replace 
the existing one if that is easier.

Note that this version might not work with the GenBank.Dictionary as I 
have never tried that...

Peter


More information about the BioPython mailing list