[Biopython] Creating GenBank files

Peter biopython at maubp.freeserve.co.uk
Thu Sep 10 11:45:19 EDT 2009


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.

Peter


More information about the Biopython mailing list