[Biopython] How do I retrieve information regarding isolation_source and clones using Entrez

Michiel de Hoon mjldehoon at yahoo.com
Thu Sep 8 13:29:59 UTC 2011


> I used the key, "GBSeq_feature-table" to see what sort of
> values are stored
> here,
> 
> >>print records[0]["GBSeq_feature-table"]
> 
> Then I get following, which seems rather confusing:
> 
> [{u'GBFeature_quals': [{u'GBQualifier_name': 'organism',
> u'GBQualifier_value': 'uncultured prokaryote'},
> {u'GBQualifier_name':
> 'isolation_source', u'GBQualifier_value': 'contaminated
> river sediment'},
> {u'GBQualifier_name': ...

As records[0]["GBSeq_feature-table"] starts with a '[', it is a Python list, and you can use it as such.

Try for example
>>> len(records[0]["GBSeq_feature-table"])

or
>> records[0]["GBSeq_feature-table"][0]

Similarly, if you see something that starts with a '{', it is a dictionary.

Best,
--Michiel.



More information about the Biopython mailing list