[Biopython] error in records

Liam Thompson dejmail at gmail.com
Wed Oct 20 13:19:14 UTC 2010


hi everyone

I am having problems seeing what is wrong with two genbank records of
Hepatitis B Virus. When I cycle through a genbank file with multiple
records, and these two are in it, it comes back with.

Traceback (most recent call last):
  File "/media/0844588592/phd/lab_book/bioinformatics/typeseq_cds_split.py",
line 13, in <module>
    for records in SeqIO.parse("cts.gb", "gb"):
  File "/usr/lib/pymodules/python2.6/Bio/GenBank/Scanner.py", line 432, in
parse_records
    record = self.parse(handle, do_features)
  File "/usr/lib/pymodules/python2.6/Bio/GenBank/Scanner.py", line 415, in
parse
    if self.feed(handle, consumer, do_features):
  File "/usr/lib/pymodules/python2.6/Bio/GenBank/Scanner.py", line 387, in
feed
    self._feed_feature_table(consumer, self.parse_features(skip=False))
  File "/usr/lib/pymodules/python2.6/Bio/GenBank/Scanner.py", line 339, in
_feed_feature_table
    consumer.location(location_string)
  File "/usr/lib/pymodules/python2.6/Bio/GenBank/__init__.py", line 673, in
location
    LocationParser.parse(LocationParser.scan(location_line))
  File "/usr/lib/pymodules/python2.6/Bio/GenBank/LocationParser.py", line
325, in parse
    return _cached_parser.parse(tokens)
  File "/usr/lib/pymodules/python2.6/Bio/Parsers/spark.py", line 203, in
parse
    self.error(tokens[i-1])
IndexError: list index out of range

I'm not sure what to make of this, especially as I've looked at the records
for quite a while now and can't seem to figure out what peculiarity of the
formatting upsets the parser.

accessions X65259 and X85254. I would appreciate any tips or explanation of
the above.

Thanks
Liam



More information about the Biopython mailing list