[BioPython] Cannot parse ApE plasmid editor GenBank file
Martin MOKREJŠ
mmokrejs at ribosome.natur.cuni.cz
Wed Jun 27 14:27:54 UTC 2007
Hi,
Martin MOKREJŠ wrote:
> Hi Peter, I have re-tried current CVS version of biopyhton with a
> file regenerated by fixed version of ApE editor. Unfortunately, I
> got:
>
> $ python generate_image_from_genbank.py Traceback (most recent call
> last): File "generate_image_from_genbank.py", line 7, in ?
> genbank_entry = parser.parse(fhandle) File
> "/usr/lib/python2.4/site-packages/Bio/GenBank/__init__.py", line 187,
> in parse self._scanner.feed(handle, self._consumer) File
> "/usr/lib/python2.4/site-packages/Bio/GenBank/Scanner.py", line 360,
> in feed self._feed_first_line(consumer, self.line) File
> "/usr/lib/python2.4/site-packages/Bio/GenBank/Scanner.py", line 876,
> in _feed_first_line raise SyntaxError('Did not recognise the LOCUS
> line layout:\n' + line) SyntaxError: Did not recognise the LOCUS line
> layout: LOCUS pBL-RLuc-GBB+3-III 5391 bp ds-DNA
> circular 14-JUN-2007
>
> What's wrong with the LOCUS line now? Bioperl from CVS can read it,
> and I thought it is already following the current specs. ;-) Thanks
> for your help, Martin
OK, I have found the spacing problem with my LOCUS lines still to persist,
and after some scripting I got the lines fixed. Now I get with current CVS
version:
$ python generate_image_from_genbank.py
Traceback (most recent call last):
File "generate_image_from_genbank.py", line 7, in ?
genbank_entry = parser.parse(fhandle)
File "/usr/lib/python2.4/site-packages/Bio/GenBank/__init__.py", line 187, in parse
self._scanner.feed(handle, self._consumer)
File "/usr/lib/python2.4/site-packages/Bio/GenBank/Scanner.py", line 361, in feed
self._feed_header_lines(consumer, self.parse_header())
File "/usr/lib/python2.4/site-packages/Bio/GenBank/Scanner.py", line 978, in _feed_header_lines
consumer.taxonomy(data.strip())
File "/usr/lib/python2.4/site-packages/Bio/GenBank/__init__.py", line 419, in taxonomy
self.data.annotations['taxonomy'] = self._split_taxonomy(content)
File "/usr/lib/python2.4/site-packages/Bio/GenBank/__init__.py", line 250, in _split_taxonomy
if taxonomy_string[-1] == '.':
IndexError: string index out of range
$
The file starts with:
LOCUS pBL-RLuc-GBB+3-III 5391 bp ds-DNA circular SYN 14-JUN-2007
DEFINITION .
ACCESSION .
VERSION .
SOURCE .
ORGANISM .
COMMENT
COMMENT ApEinfo:methylated:0
FEATURES Location/Qualifiers
More information about the Biopython
mailing list