[Biopython-dev] [Biopython (old issues only) - Bug #2578] (Closed) The GenBank SeqRecord parser does not record molecule type or if circular

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Fri Sep 12 13:57:29 UTC 2014

Issue #2578 has been updated by Peter Cock.

Status changed from New to Closed
% Done changed from 0 to 100

Closing in favour of the GitHub issue tracker, see https://github.com/biopython/biopython/issues/363
Bug #2578: The GenBank SeqRecord parser does not record molecule type or if circular

Author: Peter Cock
Status: Closed
Priority: Normal
Assignee: Biopython Dev Mailing List
Category: Main Distribution
Target version: 1.47

Filing this bug after discussion on the mailing list, where the issue was raised by Chris Lasher:

The LOCUS line at the start of a GenBank record can record the molecule type (DNA, RNA, mRNA, protein etc) and also if the sequence is linear or circular, e.g.

LOCUS       NC_002678            7036071 bp    DNA     circular BCT 22-JUL-2008

Currently Bio.SeqIO (and Bio.GenBank.FeatureParser if called directly) do not record these two bits of information in the SeqRecord.

Bio.SeqIO uses the Bio.GenBank.FeatureParser, which gets passed this information from the Scanner via the residue_type event.  This is a combined lump of data containing both the sequence type (DNA, RNA etc) and if it is linear or circular.  It is currently only used to determine the Seq alphabet, and has never been recorded.  So in addition to not recording if the LOCUS line said the sequence was circular, if the LOCUS line contained cDNA, mRNA, ... this fine detail is also currently lost in the SeqRecord representation.  On the other hand, the Bio.GenBank.RecordParser stores all this as the record's residue_type property (a single combined field, presumably reflecting the layout of early GenBank files).

It would be a logical improvement to record the sequence data (molecule type and if circular) in the SeqRecord's annotations dictionary - perhaps as two fields but we'd need to check if that would be straight forward for EMBL files too.  Alternatively, if Biopython included a native CircularSeq object, we could use that explicitly when the sequence is declared as circular.  This might be considered a little surprising though.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython-dev/attachments/20140912/cdd0edb3/attachment.html>

More information about the Biopython-dev mailing list