[Biopython] parsing genbank file

Peter Cock p.j.a.cock at googlemail.com
Mon May 14 13:48:39 UTC 2012


On Mon, May 14, 2012 at 1:03 PM, Anubrata Das <anubratadas at gmail.com> wrote:
> i am new to biopython. i wanted to parse through individual records
> from the genbank file of deinococcus radiodurans chromosome 1
> sequence.

Probably your GenBank file only contains one record (for the
whole of chr1). You could use Bio.SeqIO.read(...) in this case:

from Bio import SeqIO
record = SeqIO.parse(r"C:\Dr1.gb","genbank")
print record.id
print len(record.features)

Peter



More information about the Biopython mailing list