Gene2MeSH Web Service Guide

Base URL
http://gene2mesh.ncibi.org/fetch?

URL Parameters

geneid
Geneid is the entrez gene ID.

genesymbol
Genesymbol is the entrez gene symbol.

taxid
Taxid is the taxonomy ID from the NCBI taxonomy database.

mesh
MeSH is a Medical Subject Headings (MeSH) descriptor.

limit
Optional. Limit sets the maximum number of returned results; it defaults to 1000 if not set.

tool
Optional. Tool is a string with no internal spaces that identifies the resource using the service. Inclusion of this parameter allows us to track usage of the service.

email
Optional. Email associates an email address with the request. Inclusion of this parameter allows us to contact users if there are problems or if the software interface changes.

The following are valid parameter combinations:
geneid, genesymbol, genesymbol & taxid, mesh, mesh & taxid

Examples
http://gene2mesh.ncibi.org/fetch?geneid=1436
http://gene2mesh.ncibi.org/fetch?genesymbol=csf1r
http://gene2mesh.ncibi.org/fetch?genesymbol=csf1r&taxid=9606
http://gene2mesh.ncibi.org/fetch?mesh=diabetes
http://gene2mesh.ncibi.org/fetch?mesh=diabetes&taxid=9606

Output
The XML returned is divided into two sections. The “Request” section echos the input parameters and the values of unset parameters. The “Response” section holds the data from the query. The result set returned is ordered by the p-value of the Fisher’s Exact Test.

NOTICE: We've recently changed the XML schema for the Gene2MeSH programmatic interface. Please update your scripts accordingly.

Sample Code
Perl Example 1 - This is a example script using the Perl XPath libraries to retrieve the top 30 MeSH descriptors for a gene.
Perl Example 2 - This script combines eutils and three of NCIBI's web services: NLP, Gene2MeSH, and MiMI.