Function Repository Resource:

ReactomeEnrichmentAnalysis

Source Notebook

Query Reactome for pathway overrepresentation and expression analysis

Contributed by: Keiko Hirayama

ResourceFunction["ReactomeEnrichmentAnalysis"][data]

returns a dataset of enriched Reactome pathways based on the data analysis.

ResourceFunction["ReactomeEnrichmentAnalysis"][data,"Summary"]

returns a summary result of enriched Reactome pathways based on the data analysis.

ResourceFunction["ReactomeEnrichmentAnalysis"][token,"Result"]

returns a dataset of enriched Reactome pathways based on the token associated with the previously queried data.

Details and Options

ReactomeEnrichmentAnalysis queries the Reactome database for pathway overrepresentation and expression analysis of genes, proteins, and metabolites.
Accepted input data includes a dataset, a list, or plain text of identifiers to analyze, optionally paired with their expression values.
A dataset or list of genes, proteins, or metabolites without expression values will result in overrepresentation analysis.
Identifiers include accessions for genes, proteins, and other chemicals from databases such as UniProt, Ensembl, ChEBI, IUPHAR, miRBase, NCBI Protein, EMBL, and PubChem Compound.
The following options can be given:
"Interactors"Falsewhether to include all available protein-protein interactors for the analysis
"Species"Allspecies used to filter the results; NCBI Taxonomy identifier, species name, or Reactome database identifiers can be used; see the list of species for the Reactome database
"PageSize"20pathways per page
"Page"1page number
"SortBy""ENTITIES_PVALUE"property used to sort the results; allowed values include: "ENTITIES_PVALUE", "NAME", "TOTAL_ENTITIES", "TOTAL_INTERACTORS", "TOTAL_REACTIONS", "FOUND_ENTITIES", "FOUND_INTERACTORS", "FOUND_REACTIONS", "ENTITIES_RATIO", "ENTITIES_FDR", "REACTIONS_RATIO"
"Order""ASC""ASC" (ascending) or "DESC" (descending) order to sort the results
"Resource""TOTAL"resource used to filter the results; allowed values include: "TOTAL", "UNIPROT", "ENSEMBL", "CHEBI", "IUPHAR", "MIRBASE", "NCBI_PROTEIN", "EMBL", "COMPOUND", "ENTITIES_FDR", "PUBCHEM_COMPOUND"
"PValue"1p-value threshold; results with p-value equal to or less than the supplied threshold will be returned
"IncludeDisease"Truewhether the disease pathways be included in the results
"Min"Noneminimum number of entities that a pathways should have to be included in the results
"Max"Nonemaximum number of entities that a pathways should have to be included in the results
"ImportableOnly"Falsewhether to include only importable resources
"HumanProjection"Falsefor identifiers of different species, whether to project the results to Homo Sapiens
"Header"Falsewhether to treat a first item in the data list as a header
The token returned for the result of ReactomeEnrichmentAnalysis can be used as an option in the ReactomePathway function to overlay the results on a selected pathway.

Examples

Basic Examples (2) 

Find overrepresented pathways for the list of genes:

In[1]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"PIK3C2A", "PTEN", "UNC5B"}]
Out[1]=

Define a sample dataset of Ensembl genes and their expression levels:

In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/3f601d29-4ce7-4f4d-a033-b1552d6fdd07"]
Out[2]=

Get a summary result:

In[3]:=
summary = ResourceFunction["ReactomeEnrichmentAnalysis"][geneexpressiondata, "Summary"]
Out[3]=

Retrieve a dataset of enriched Reactome pathways:

In[4]:=
expressionpath = ResourceFunction["ReactomeEnrichmentAnalysis"][geneexpressiondata]
Out[4]=

Use a token from the analysis in the ResourceFunction["ReactomePathway"] to retrieve results overlaid on a selected pathway:

In[5]:=
ResourceFunction["ReactomePathways"][
 expressionpath[1, 1]["ExternalID"], "Image", "Token" -> summary["token"], "DiagramProfile" -> "Standard", "AnalysisProfile" -> "Strosobar"]
Out[5]=

Scope (3) 

Find overrepresented pathways for the list of mouse genes:

In[6]:=
mussum = ResourceFunction[
  "ReactomeEnrichmentAnalysis"][{"ENSMUSG00000030660", "ENSMUSG00000021326", "ENSMUSG00000013663", "ENSMUST00000077925"}, "Summary"]
Out[6]=

Use a token from the analysis and get the details on the enriched pathways:

In[7]:=
muspath = ResourceFunction["ReactomeEnrichmentAnalysis"][mussum["token"], "Result"]
Out[7]=

Use a token from the analysis to highlight overrepresentation results on a selected human pathway:

In[8]:=
Manipulate[
 Show[ResourceFunction["ReactomePathways"][
   muspath[path, 1]["ExternalID"], "Image", "Token" -> mussum["token"],
    "DiagramProfile" -> "Standard", "AnalysisProfile" -> "Strosobar"],
   ImageSize -> 600], {path, 1, 10, 1}, ControlType -> Setter]
Out[8]=

Options (13) 

Interactors (1) 

Find enriched Reactome pathways including interactors:

In[9]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "Interactors" -> True]
Out[9]=

Species (1) 

Find enriched Reactome pathways for dogs:

In[10]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "Species" -> "Canis lupus familiaris"]
Out[10]=

PageSize (1) 

Set the size of the enrichment analysis output to five:

In[11]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "PageSize" -> 5]
Out[11]=

Page (1) 

Show the second set of results from the enrichment analysis:

In[12]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "Page" -> 2]
Out[12]=

SortBy (1) 

Sort the results of the enrichment analysis by the name of a pathway:

In[13]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "SortBy" -> "NAME"]
Out[13]=

Order (1) 

Sort the enrichment analysis results by pathway name in descending order:

In[14]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "SortBy" -> "NAME", "Order" -> "DESC"]
Out[14]=

Resource (1) 

Find enriched Reactome pathways based on the UniProt:

In[15]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "Resource" -> "UNIPROT"]
Out[15]=

PValue (1) 

Find enriched Reactome pathways with a p-value of 0.05 or less:

In[16]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "PValue" -> 0.05]
Out[16]=

IncludeDisease (1) 

Find enriched Reactome pathways, excluding disease-related pathways:

In[17]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "IncludeDisease" -> False]
Out[17]=

Min/Max (1) 

Set minimum and maximum numbers of contained entities per identified pathway:

In[18]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"SNX4", "A2M", "SICO1B3", "SICO1A2", "STARD3", "ALOXE3", "SMARCA2", "CYP19A1", "TPI1", "SNRK"}, "Min" -> 5, "Max" -> 10]
Out[18]=

ImportableOnly (1) 

Find enriched Reactome pathways, filtering for resources that are importable:

In[19]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"ENSCAFG00845024647", "ENSCAFG00845016387", "ENSCAFG00845000279"}, "ImportableOnly" -> True]
Out[19]=

HumanProjection (1) 

Project canine gene data to orthologous enriched pathways in humans:

In[20]:=
ResourceFunction[
 "ReactomeEnrichmentAnalysis"][{"ENSCAFG00845024647", "ENSCAFG00845016387", "ENSCAFG00845000279"}, "HumanProjection" -> True]
Out[20]=

Header (1) 

Treat the first row of the plain text data as a header:

In[21]:=
ResourceFunction["ReactomeEnrichmentAnalysis"][\!\(\*
TagBox[
StyleBox["\"\<Gene\\nSNX4\\nA2M\\nSICO1B3\\nSICO1A2\>\"",
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True,
"NodeID" -> 100],
FullForm]\), "Header" -> True]
Out[21]=

Requirements

Wolfram Language 14.0 (January 2024) or above

Version History

  • 1.0.0 – 25 June 2025

Source Metadata

Related Resources

License Information