[BioPython] Cannot parse GenBank file

Martin MOKREJŠ mmokrejs at ribosome.natur.cuni.cz
Tue Jun 5 12:21:36 UTC 2007


Hi,
  I am trying to parse a GenBank file created by ApE plasmid editor (see Google
for details) with biopython-1.43 and I get:


>>> fhandle = open('/mnt/smartmedia/pim-1/pGL3R.gb')
>>> genbank entry = parser.parse(fhandle)
  File "<stdin>", line 1
    genbank entry = parser.parse(fhandle)
                ^
SyntaxError: invalid syntax
>>> genbank_entry = parser.parse(fhandle)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  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 835, in _feed_first_line
    assert False, \
AssertionError: Did not recognise the LOCUS line layout:
LOCUS               6499 bp ds-DNA     linear       02-AUG-2006

>>> 


Is the number of spaces wrong?
Thanks for clues,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pGL3R.gb.zip
Type: application/zip
Size: 3713 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/biopython/attachments/20070605/6fa6d850/attachment-0002.zip>


More information about the Biopython mailing list