[BioPython] Bio.EUtils, MultiDict: getting all the authors?
Peter
biopython at maubp.freeserve.co.uk
Tue Aug 12 21:49:43 UTC 2008
On Tue, Aug 12, 2008 at 10:24 PM, richard k belew <rik at cogsci.ucsd.edu> wrote:
> i am sure this has to have been addressed in a universe long ago and far
> away, but...
>
> i'm trying to use Bio.EUtils to access NCBI/Entrez, but seem unable to
> use its MultDict utilities as they are intended.
>
> i include a sample run below.
> i can contact NCBI and get the data just fine. and the AuthorList =
> <OrderedMultiDict> is accessible. the summary() whines about
> finding "multiple Items named 'Author'!"
>
> is there some (recursive?) idiom that is typically used? i can
> explicitly make the hack for extracting from the AuthorList, but
> want to do something similar for any other OrderedMultiDicts, and
> would like it all to stay as close to the DTDs as possible!
>
> thanks for your help.
Hi Rik,
I don't know enough about Bio.EUtils to be able to help. This module
is currently without an maintainer, and its deprecation has been
suggested in favour of the much simpler Bio.Entrez module (which is
covered pretty thoroughly in the documentation).
I would suggest you try Bio.Entrez.efetch() to get the data as XML,
and the Bio.Entrez.read() function to parse the XML. You'll get a
nested structure of python dictionaries and lists. See "Chapter 7" of
the Tutorial,
http://www.biopython.org/DIST/docs/tutorial/Tutorial.html
Was there anything particular piece of information you wanted to extract?
Peter
More information about the Biopython
mailing list