[Biopython] Creating GenBank files

Peter biopython at maubp.freeserve.co.uk
Thu Sep 10 15:46:22 UTC 2009


On Thu, Sep 10, 2009 at 4:45 PM, Peter <biopython at maubp.freeserve.co.uk> wrote:
> On Thu, Sep 10, 2009 at 4:24 PM, Peter Saffrey <pzs at dcs.gla.ac.uk> wrote:
>> I'm trying to create a GenBank file from a sequence and some annotation
>> information. Can BioPython do this? I can't seem to find anything obvious in
>> the documentation.
>
> Yes, you must create a SeqRecord object with suitable SeqFeature objects,
> and then write it out with SeqIO in GenBank format. If all your features have
> trivial locations, this is pretty easy.
>
> For example, I've done this to make simple gene predictions based on ORF
> finding and selecting the most upstream start codon, then generating the
> corresponding SeqFeatures, and saving this as a GenBank file.

P.S. You need Biopython 1.51 or later to be able to write out GenBank files
with features.

Peter



More information about the Biopython mailing list