[Biopython] parsing genbank file
Anubrata Das
anubratadas at gmail.com
Mon May 14 12:03:29 UTC 2012
i am new to biopython. i wanted to parse through individual records
from the genbank file of deinococcus radiodurans chromosome 1
sequence.for e.g i wanted the list of identifiers for each record
>>> identifiers=[seq_record.id for seq_record in SeqIO.parse("C:\\Dr1.gb","genbank")]
>>> identifiers[:10]
['NC_001263.1']
but i would get only one master entry. then if i wanted to parse thru
individual records
>>> record=SeqIO.parse("C:\\Dr1.gb","genbank")
>>> record.next()
SeqRecord(seq=UnknownSeq(2648638, alphabet = IUPACAmbiguousDNA(),
character = 'N'), id='NC_001263.1', name='NC_001263',
description='Deinococcus radiodurans R1 chromosome 1, complete
sequence.', dbxrefs=['Project:57665'])
>>> record.next()
Traceback (most recent call last):
File "<pyshell#25>", line 1, in <module>
record.next()
StopIteration
i get this output.
please tell me the correct method
regards
--
Anubrata Das
Scientific Officer
Molecular Biology Division
Bhabha Atomic Research Centre
More information about the Biopython
mailing list