Question: How do I get SeqIO.write() to make a genbank file that includes the REFERENCE field?
gravatar for Tom
4.2 years ago by
United States
Tom20 wrote:

As I have it set up right now, Seq.IO.write(mygenbankObject, outfileHandle, genbank) seems to just write the LOCUS field, and the FEATURES field, but leaves everything else blank. It doesn't include the REFERENCE, which is what I need my final .gb file to have.


(Additionally, I don't even know what to call the titles that are in big capital letters in a genbank file. What's the technical term for the category that is: LOCUS, ORGANISM, REFERENCE, AUTHORS, FEATURES, etc...?)

Edit: I just found out those fields are called keys:

>>> record.annotations.keys()
['comment', 'sequence_version', 'source', 'taxonomy', 'keywords', 'references',
'accessions', 'data_file_division', 'date', 'organism', 'gi']

Now if only I can get the reference region

seqio genbank biopython python • 1.3k views
ADD COMMENTlink modified 4.2 years ago by Peter5.8k • written 4.2 years ago by Tom20
gravatar for Peter
4.2 years ago by
Scotland, UK
Peter5.8k wrote:

If you are creating the SeqRecord object yourself in code (rather than using the Biopython parser), you will need to create a list of Bio.SeqFeature.Reference objects as the record.annotations["references"] entry.

Or, rather than using the SeqRecord approach and Bio.SeqIO, you could use the simpler GenBank specific code in Bio.GenBank which you may find easier?

ADD COMMENTlink written 4.2 years ago by Peter5.8k
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: 1980 users visited in the last hour