[Biopython] Lineage from GenBank files Question
Ara Kooser
akooser at unm.edu
Wed Oct 27 13:51:19 UTC 2010
Peter,
I went through the docs on the wiki for SeqRecords. I realized I
forgot to run the "print record.annotations" to get the correct words.
Thank you for your help!
Ara
>
> Did you look at the annotations dictionary?
>
>>>> from Bio import SeqIO
>>>> record = SeqIO.read("NC_000932.gb", "genbank")
>>>> print record.annotations.keys()
> ['comment', 'sequence_version', 'source', 'taxonomy', 'keywords',
> 'references', 'accessions', 'data_file_division', 'date', 'organism',
> 'gi']
>>>> print record.annotations
> {'comment': ..., 'gi': '7525012'}
>>>> print record.annotations['gi']
> 7525012
>>>> print record.annotations['accessions']
> ['NC_000932']
More information about the Biopython
mailing list