[Biopython] using efetch to return mesh terms

Michiel de Hoon mjldehoon at yahoo.com
Wed Nov 28 05:30:20 UTC 2012


It's not a json, it's just a Python dictionary.
Best,
-Michiel.


--- On Tue, 11/27/12, Alex Garnett <axfelix at gmail.com> wrote:

From: Alex Garnett <axfelix at gmail.com>
Subject: Re: [Biopython] using efetch to return mesh terms
To: "Michiel de Hoon" <mjldehoon at yahoo.com>
Cc: "biopython" <biopython at lists.open-bio.org>
Date: Tuesday, November 27, 2012, 11:42 PM

Thanks for the quick response, Michiel.
I've been trying:
handle = Entrez.efetch(db="pubmed", id=pmids, rettype="medline", retmode="xml")


records = Entrez.read(handle)
where pmids is a list of pubmed IDs.
this returns the following json:
{u'MedlineCitation': DictElement({u'OtherID': [], u'OtherAbstract': [], u'CitationSubset': ['IM'], u'KeywordList': [], u'DateCreated': {u'Month': '11', u'Day':

'20', u'Year': '2012'}, u'SpaceFlightMission': [], u'GeneralNote': [], u'Article': DictElement({u'ArticleDate': [], u'Pagination': {u'MedlinePgn': '140-54'}, u'AuthorList': ListElement([DictElement({u'LastName': 'Goupil', u'Initials': 'L',

u'NameID': [], u'ForeName': 'Louise'}, attributes={u'ValidYN': u'Y'}), DictElement({u'LastName': 'Bekinschtein', u'Initials': 'T', u'NameID': [], u'ForeName': 'Tristan'}, attributes={u'ValidYN': u'Y'})], attributes={u'Type': u'authors', u'CompleteYN': u'Y'}), u'Language': ['eng'], u'PublicationTypeList': ['Journal Article'], u'Journal': {u'ISSN': StringElement('0003-9829', attributes={u'IssnType': u'Print'}), u'ISOAbbreviation': 'Arch Ital Biol', u'JournalIssue': DictElement({u'Volume': '150', u'Issue': '2-3', u'PubDate': {u'Month': 'Jun', u'Year': '2012'}}, attributes={u'CitedMedium': u'Print'}), u'Title': 'Archives italiennes de biologie'}, u'Affiliation': 'MRC Cognition and Brain Sciences Unit, 15 Chauces Road, CB2 7EF, Cambridge,UK Email: louisegoupil at hotmal.fr.', u'ArticleTitle': 'Cognitive processing during the transition to sleep.', u'ELocationID': [StringElement('10.4449/aib.v150i2.1247', attributes={u'ValidYN': u'Y', u'EIdType': u'doi'})],
 u'Abstract': {u'AbstractText': ['Several dramatic physiological and behavioural changes occur during the transition from wakefulness to sleep. The process is regarded as a grey area of consciousness between attentive wakefulness and slow wave sleep. Although there is evidence of neurophysiological integration decay

as signalled by sleep EEG elements, changes in power spectra and coherence, thalamocortical connectivity in fMRI, and single neuron changes in firing patterns,little is known about the cognitive and behavioural dynamics of these transitions. Hereby we revise the body and brain physiology, behaviour and phenomenology of these changes of consciousness and propose an experimental framework to integrate the two aspects of consciousness that interact in the transition, wakefulness and awareness.']}}, attributes={u'PubModel': u'Print'}), u'PMID': StringElement('23165874', attributes={u'Version': u'1'}), u'MedlineJournalInfo': {u'MedlineTA': 'Arch Ital Biol', u'Country': 'Italy', u'NlmUniqueID': '0372441', u'ISSNLinking': '0003-9829'}}, attributes={u'Owner': u'NLM', u'Status': u'In-Data-Review'}), u'PubmedData': {u'ArticleIdList': [StringElement('23165874', attributes={u'IdType': u'pubmed'})], u'PublicationStatus': 'ppublish', u'History':
 [DictElement({u'Month': '2', u'Day': '07', u'Year': '2012'}, attributes={u'PubStatus': u'accepted'}), DictElement({u'Minute': '0', u'Month': '11', u'Day': '21', u'Hour': '6', u'Year': '2012'}, attributes={u'PubStatus': u'entrez'}), DictElement({u'Minute': '0', u'Month': '11', u'Day': '21', u'Hour': '6', u'Year': '2012'}, attributes={u'PubStatus': u'pubmed'}), DictElement({u'Minute': '0', u'Month': '11', u'Day': '21', u'Hour': '6', u'Year': '2012'}, attributes={u'PubStatus': u'medline'})]}}


I've tried tweaking the rettype and retmode parameters a bit, but with no success.

-alex




On Tue, Nov 27, 2012 at 8:38 PM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:


Hi Alex,

Exactly which command did you try?

Best,

-Michiel.



--- On Tue, 11/27/12, Alex Garnett <axfelix at gmail.com> wrote:



> From: Alex Garnett <axfelix at gmail.com>

> Subject: [Biopython] using efetch to return mesh terms

> To: "biopython" <biopython at lists.open-bio.org>

> Date: Tuesday, November 27, 2012, 10:28 PM

> hi folks,

>

> quick question -- first time using biopython and I'm just

> trying to

> jury-rig something real quick based on tutorials.

>

> I can't seem to get Entrez.efetch() to return mesh terms for

> a given

> article, and the documentation here isn't encouraging:

> http://www.ncbi.nlm.nih.gov/books/NBK25499/

>

> anything obvious I'm missing? thanks!

>

> -alex

> _______________________________________________

> Biopython mailing list  -  Biopython at lists.open-bio.org

> http://lists.open-bio.org/mailman/listinfo/biopython

>







More information about the Biopython mailing list