[Biopython] parsing genbank file

Lapointe, David David.Lapointe at umassmed.edu
Mon May 14 14:00:20 UTC 2012


You might try looking for sequences here

ftp://ftp.ncbi.nlm.nih.gov/genomes/Bacteria/Deinococcus_radiodurans_R1_uid57665/

David

-----Original Message-----
From: biopython-bounces at lists.open-bio.org [mailto:biopython-bounces at lists.open-bio.org] On Behalf Of Peter Cock
Sent: Monday, May 14, 2012 9:49 AM
To: Anubrata Das
Cc: biopython at lists.open-bio.org
Subject: Re: [Biopython] parsing genbank file

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
_______________________________________________
Biopython mailing list  -  Biopython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython





More information about the Biopython mailing list