[Biopython-dev] [Biopython - Bug #3197] SeqIO parse error with some genbank files

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Fri May 13 09:07:01 UTC 2011


Issue #3197 has been updated by Peter Cock.


Another example from http://biostar.stackexchange.com/questions/8203/bio-genbank-locationparsererror

Aeropyrum pernix K1 genome, NC_000854.gbk
ftp://ftp.ncbi.nih.gov/genomes/Bacteria/Aeropyrum_pernix_K1_uid57757/NC_000854.gbk

>>> from Bio import SeqIO
>>> r = SeqIO.read("NC_000854.gbk", "gb")
...
Bio.GenBank.LocationParserError: Combinations of "join" and "order" within the same location (nested operators) are illegal:
order(join(649703..649712,649751..649752),650047..650049)

I have reported this GenBank file to the NCBI via gb-admin at ncbi.nlm.nih.gov
----------------------------------------
Bug #3197: SeqIO parse error with some genbank files
https://redmine.open-bio.org/issues/3197

Author: Cedar McKay
Status: Resolved
Priority: Normal
Assignee: Biopython Dev Mailing List
Category: Main Distribution
Target version: 1.56
URL: 


I've found a file that seems to choke SeqIO genbank parsing.  I downloaded this file straight from NCBI, so it should be a good file. I've found a couple of other files that do the same thing. I reproduced this bug on another machine, also with biopython 1.56. I am able to successfully parse other genbank files. Maybe it has something to do with that very long location?  Please let me know if I can provide any other information!
Thanks!

Cedar


>>> from Bio import SeqIO
>>> record = SeqIO.read('./Acorus_americanus_NC_010093.gb', 'genbank')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/SeqIO/__init__.py", line 597, in read
    first = iterator.next()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/SeqIO/__init__.py", line 525, in parse
    for r in i:
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/GenBank/Scanner.py", line 437, in parse_records
    record = self.parse(handle, do_features)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/GenBank/Scanner.py", line 420, in parse
    if self.feed(handle, consumer, do_features):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/GenBank/Scanner.py", line 392, in feed
    self._feed_feature_table(consumer, self.parse_features(skip=False))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/GenBank/Scanner.py", line 344, in _feed_feature_table
    consumer.location(location_string)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/GenBank/__init__.py", line 975, in location
    raise LocationParserError(location_line)
Bio.GenBank.LocationParserError: order(join(42724..42726,43455..43457),43464..43469,43476..43481,43557..43562,43569..43574,43578..43583,43677..43682,44434..44439)



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org




More information about the Biopython-dev mailing list