[BioPython] GenBank.FeatureParser() error in Locus field?

Brad Chapman chapmanb@arches.uga.edu
Fri, 5 Apr 2002 08:57:36 -0500


Hi Cymon;

> The GenBank.FeatureParser() appears to bomb on the topology definition
> in the Locus field: 
[...]
> LOCUS       BBI251310                642 bp    DNA     linear   PLN

> Traceback (most recent call last):
[...]
> ParserPositionException: error parsing at or beyond character 55
> Character 55 is the last space before the 'l' of linear. If 'linear' is
> removed from the locus field the record parses just fine.

Thanks for the clear bug report. This problem occured when GenBank added
the "linear" keyword in their latest release, which was conveniently
timed just after the latest Biopython release.

This problem has been fixed in the current CVS code. If you go to:

http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/?cvsroot=biopython

you can download a tarball of the latest CVS (or you can access
anonymous CVS using the instructions at cvs.biopython.org). You can also
just change Bio/GenBank/genbank_format.py if you don't want to download
the whole CVS. It is a simple one-line change which I described here:

http://www.biopython.org/pipermail/biopython/2002-February/000794.html

I hope this solves your problem! Don't hesitate to ask if you have any
other questions.

Brad