[BioPython] Martel.Parser.ParserPositionException:

Marc Saric marc.saric at gmx.de
Fri Apr 15 09:44:44 EDT 2005


Hi all,

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).

If I use a version of the file, which does not have the
feature-annotations, it gives the following 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 36, in load
     raise TypeError("Cannot identify file as a %s format" %
TypeError: Cannot identify file as a unknown format
	
===snap===

which -to me- sounds a bit strange, as it looks like a normal Genbank-file.

If someone has a clue...

Thanks in advance.

-- 
Bye,
Marc Saric  http://www.marcsaric.de


More information about the BioPython mailing list