[Biopython-dev] [Bug 1773] New: Martel.Parser.ParserPositionException

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Tue Apr 26 06:35:59 EDT 2005


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

           Summary: Martel.Parser.ParserPositionException
           Product: Biopython
           Version: Not Applicable
          Platform: PC
               URL: http://portal.open-bio.org/pipermail/biopython/2005-
                    April/002604.html
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Martel/Mindy
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: marc.saric at gmx.de


I tried to index the the following Genbank file with this simple script
(as described in the cookbook) but it failed with the following traceback.

The file can be found in:

http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?val=BA000018

including all features (SNP, CDD, MGC, HPRD, STS)

I tried with Biopython 1.3, Biopython 1.4b and the Biopython-CVS as of
2005-04-15.

The program

===snip===
#!/usr/bin/env python
from Bio import GenBank

dict_file = "ba000018_s_aureus_n315_genome.gb"
index_file = "ba000018_s_aureus_n315_genome.idx"

GenBank.index_file(dict_file, index_file)
===snap===

The Traceback:

===snip===
Traceback (most recent call last):
  File "/home/saric/data/devel/workspace/scripts/hitman/index_gb.py",
line 37, in ?
    GenBank.index_file(dict_file, index_file) # FIXME: This breaks with
the N315 S.aureus-genome
  File
"/home/saric/transfer/source/biopython/biopython_cvs_20050415/biopython/build/lib.linux-i686-2.3/Bio/GenBank/__init__.py",
line 1283, in index_file
    SimpleSeqRecord.create_flatdb([filename], indexname, indexer)
  File
"/home/saric/transfer/source/biopython/biopython_cvs_20050415/biopython/build/lib.linux-i686-2.3/Bio/Mindy/SimpleSeqRecord.py",
line 152, in create_flatdb
    creator.load(filename, builder = builder, fileid_info = {})
  File
"/home/saric/transfer/source/biopython/biopython_cvs_20050415/biopython/build/lib.linux-i686-2.3/Bio/Mindy/BaseDB.py",
line 52, in load
    for record in iterator.iterate(source, cont_handler = builder):
  File
"/home/saric/transfer/source/biopython/biopython_cvs_20050415/biopython/build/lib.linux-i686-2.3/Martel/IterParser.py",
line 71, in iterateFile
    raise Parser.ParserPositionException(self.start_position)
Martel.Parser.ParserPositionException: error parsing at or beyond
character 5887615

===snap===

I use a x86-machine running SuSE-Linux 9.1 (kernel 2.6.5-7.147-default,
gcc version 3.3.3).

The error is most likely due to a trainling blank line in the GenBank-file,
which is there for all "official" downloads I checked (see my post on the
Biopython-mailinglist (link above)).

Either this is a bug in GenBank (delivering invalid files) or something minor in
the Martel-Parser, which does not like blank lines at the end of the file.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list