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

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Thu Apr 7 01:01:11 UTC 2011


Issue #3197 has been updated by Cedar McKay.


I did a little more poking, and it really seems like a common mistake. I'm working with this file:
ftp://ftp.ncbi.nih.gov/refseq/release/plastid/plastid1.genomic.gbff.gz
which is a file containing all plastid genomes in genbank. It has 208 records, and of those, 124 have an illegal  location containing the string 'order(join('

One thing that I noticed is that all but two examples of 'order(join(' that appear across those 124 records are describing the location of a ycf3 feature!

Strange! I'll send them an email about it, but I'm not really sure what is going on.

I followed your suggestion for my test file, and changed the the location of that misc_feature. It got hung up on yet another ycf3 gene: 
<pre>
     misc_feature    complement(order(42643..42645,42652..42654,42664..42666,
                     43470..43472,43515..43517,43524..43526,43536..43538,
                     43572..43574,43626..43628,43635..43637,43647..43649,
                     join(43683..43684,44430)))
                     /gene="ycf3"
</pre>

I got rid of the join there too, and finally it could be parsed.

Thanks for looking at this, I don't quite know what to make of it yet, or how to deal with it.

----------------------------------------
Bug #3197: SeqIO parse error with some genbank files
https://redmine.open-bio.org/issues/3197

Author: Cedar McKay
Status: New
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