Question: BioPython error parsing standard GenBank file
gravatar for morgan.beeby
4.8 years ago by
United Kingdom
morgan.beeby10 wrote:

Dear all,

I've recently resurrected a bioinformatics pipeline I put together a few years ago to load bacterial genome GenBank files into a MySQL database.

Having downloaded *.gbk from the genomes/Bacteria directory on, however, I get an error with many of the files:

ValueError: Expected CONTIG continuation line, got:

It seems that there's an additional CONTIG field immediately before the nucleotide sequence (for example, this occurs with NC_019435.gbk).

Can anyone shed any light on the reason for this error now arising? I don't have any 'old versions' of these files around, but assume that the file format has been modified by GenBank?

many thanks,




biopython • 1.7k views
ADD COMMENTlink modified 4.8 years ago by Peter5.7k • written 4.8 years ago by morgan.beeby10

Standard Genbank file is an oxymoron, there might be an standard but people do what they please with it, it part of its definition.

ADD REPLYlink written 4.8 years ago by Raygozak1.3k

Yeah, but it is an NCBI format so what they do is usually the standard ;)

ADD REPLYlink written 4.7 years ago by Peter5.7k
gravatar for Peter
4.8 years ago by
Scotland, UK
Peter5.7k wrote:

The GenBank format evolves over time, and newer versions of Biopython cope with this change fine. You appear to have an older copy of Biopython installed.

ADD COMMENTlink written 4.8 years ago by Peter5.7k
gravatar for umer.zeeshan.ijaz
4.8 years ago by
Glasgow, UK
umer.zeeshan.ijaz1.7k wrote:

I just downloaded NC_019435.gbk.gz from here

and loaded it up in biopython

>>> from Bio import SeqIO
>>> for r in SeqIO.parse("NC_019435.gbk","genbank"):
...     print

It doesn't seem to have a problem. Perhaps you can share your genbank file and I can have a look?


ADD COMMENTlink written 4.8 years ago by umer.zeeshan.ijaz1.7k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 821 users visited in the last hour