Reactome is a free, open-source, open access, curated and peer-reviewed knowledgebase of biomolecular pathways. Knowledge in Reactome is captured as instances of the classes with their associated attributes. The Reactome data model is comprised primarily of classes of Pathways, Reactions and PhysicalEntities (e.g. proteins, small molecules) that are organized in a hierarchical manner (Pathways contain Reactions, Reactions contain PhysicalEntities). Classes have attributes that hold properties of the represented class instances, such as names, identifiers, etc.

The ReactomeContentService4R package provides an interface to query Reactome data from the Content Service. This package allows you to query Reactome’s Content Service using many of the same endpoints available on the website, but formats the returned data in R Data Frames. For example, you can query all of the participants/PhysicalEntities in a Reaction by providing its stable identifier (‘R-HSA-123456’) to the getParticipants("R-HSA-123456", retrieval="PhysicalEntities") method in the package. This will return an R Data Frame that will hold the same attributes as the Content Service query curl -X GET "https://reactome.org/ContentService/data/participants/R-HSA-123456" -H "accept: application/json".

Similar functionality exists for a number of other Reactome Content Service endpoints, which is outlined further below in this document. You can retrieve specific instances, or all instances within a specific Class (eg: Pathway or Complex); Generate mappings, such as PhysicalEntity-to-Events (ie. Proteins to Reactions) mappings, or non-Reactome identifiers (such as UniProt) to Events/PhysicalEntities (for example, Reactome Proteins containing UniProt identifiers) mappings; Export or view Reactome’s Pathway/Reaction diagrams, and much more!


Install from Bioconductor:

if (!requireNamespace("BiocManager")) {
## Connecting...welcome to Reactome v88!

Instance fetching

Fetch by Class

To retrieve instances of one Class, you can use getSchemaClass. This function would first show how many instances belong to the specified Class in the Reactome Database, and return 1000 instances by default. If you want to retrieve all instances of one Class, specify all = TRUE.

Argument species could be specified here but only for Event or subclasses with species attribute under PhysicalEntity (i.e. Complex, EntitySet, etc). Some attributes are also retrieved and thus they can be used to filter. For example, to fetch all human pathways, and then select those in disease:

# Fetch all Human Pathways
pathways <- getSchemaClass(class = "Pathway", species = "human", all = TRUE)
## Total 2698 entries of Pathway with species Homo sapiens, retrieving 2698 of them...
##   |                                                                              |                                                                      |   0%
head(pathways, 5)
# Filter Disease Pathways from results
disease.pathways <- pathways[pathways$isInDisease == TRUE, ]
head(disease.pathways, 5)

Fetch by identifier

Now that we have got all those disease pathways, we can look into what disease(s) associated with a pathway of your interest. The query function could fetch all attributes of an instance with any Class by its database id or stable id. It also lists any second level relationships regarding regulations and catalysts. As an example, to retrieve one of the human disease pathway “Activated point mutants of FGFR2” with identifier R-HSA-2033519:

# Fetch the Reactome object with all attributes using a given id
hsa.2033519 <- query(id = "R-HSA-2033519")
str(hsa.2033519, max.level = 1)
## List of 25
##  $ dbId               : int 2033519
##  $ displayName        : chr "Activated point mutants of FGFR2"
##  $ stId               : chr "R-HSA-2033519"
##  $ stIdVersion        : chr "R-HSA-2033519.2"
##  $ created            :List of 5
##  $ modified           :List of 5
##  $ isInDisease        : logi TRUE
##  $ isInferred         : logi FALSE
##  $ name               : chr "Activated point mutants of FGFR2"
##  $ releaseDate        : chr "2012-06-12"
##  $ speciesName        : chr "Homo sapiens"
##  $ authored           :'data.frame': 1 obs. of  5 variables:
##  $ compartment        :'data.frame': 3 obs. of  9 variables:
##  $ disease            :'data.frame': 2 obs. of  10 variables:
##  $ edited             :'data.frame': 1 obs. of  5 variables:
##  $ literatureReference:'data.frame': 17 obs. of  11 variables:
##  $ reviewed           :'data.frame': 1 obs. of  5 variables:
##  $ species            :'data.frame': 1 obs. of  8 variables:
##  $ summation          :'data.frame': 1 obs. of  5 variables:
##  $ reviewStatus       :List of 6
##  $ hasDiagram         : logi FALSE
##  $ hasEHLD            : logi FALSE
##  $ hasEvent           :'data.frame': 10 obs. of  15 variables:
##  $ className          : chr "Pathway"
##  $ schemaClass        : chr "Pathway"

The schemaClass of R-HSA-2033519 is Pathway since we get this id by getSchemaClass for Pathway. Likewise, we can always access what Class an instance belongs to using query.

Here we look into the disease slot to find disease associated with this Pathway:


Search for name

We can see that the pathway “Activated point mutants of FGFR2” is related to two disease: “bone development disease” and “cancer”. If you want to know more about bone development disease, you may try to use the query function again with its dbId to obtain more details. However, you would just get a Reactome Disease object that doesn’t include any other biological insights in Reactome. For now, you can use searchQuery function which fetches all instances associated with a term:

# Search for a human disease name
bdd.search <- searchQuery(query = "bone development disease", species = "human")
## Searching for term 'bone development disease'... species:'Homo sapiens'
# the entries dataframe for the first row, with typeName 'Pathway'

The result instances are primarily faceted by types available for this query term. As such, you could know what pathways (the above dataframe), reactions, proteins, etc. are related to the bone development disease in human.

Filters in searchQuery() include species, types, compartments, keywords; all the items for filtering can be viewed using function listSearchItems. For more details, see ?listSearchItems.

Participants of Event

Events represent biological processes and are further subclassed into Pathways and ReactionLikeEvents in Reactome. ReactionLikeEvents are single-step molecular transformations. Pathways are ordered groups of ReactionLikeEvents that together carry out a biological process.

Participants of a given Event (e.g. reactions of a pathway, participating molecules of a reaction) can be retrieved using function getParticipants. Some explanations on the retrieval options in this function:

  • AllInstances: retrieve all PhysicalEntities and collections of ReferenceEntities. For entities in a ReactionLikeEvent, there would be additional columns type and numOfEntries to indicate what are inputs, outputs, catalysts, regulators, and the number of these components
  • EventsInPathways: retrieve all ReactionLikeEvents and subpathways in a given Pathway
  • PhysicalEntities/ReferenceEntities: retrieve all contained PhysicalEntities/ReferenceEntities of all PhysicalEntities of a given Event

To be more specific, PhysicalEntity instances contain numerous invariant features such as names, molecular structure and links to external databases like UniProt or ChEBI. Thus, Reactome creates instances of the separate ReferenceEntity class that support PhysicalEntity instances. All PhysicalEntity instances have a linked ReferenceEntity instance that captures reference features (such as external identifiers) of a molecule.

Events in Pathways

Since we’ve known several pathways related to the bone development disease from above results, we might further retrieve ReactionLikeEvents and Pathways in the “hasEvent” attribute of Pathway “Signaling by FGFR1 in disease” (stId R-HSA-5655302):

# Get sub-Events of an Event
fgfr1.signal.reactions <- getParticipants("R-HSA-5655302", retrieval = "EventsInPathways")
head(fgfr1.signal.reactions, 5)

Instances in Reactions

For a ReactionLikeEvent, say “Activated FGFR1 mutants and fusions phosphorylate PLCG1” with identifier R-HSA-1839098, all relative PhysicalEntities and ReferenceEntities could be retrieved:

# Get all Entities of a ReactionLikeEvent
instances.1839098 <- getParticipants("R-HSA-1839098", retrieval = "AllInstances")

It’s always a good option to visualize the instances in a reaction or pathway for better elucidations. Reactome has diagrams for pathways and reactions that provide information about connected events and their locations. The diagram exporter in Content Service allows users to easily export diagrams in bitmap format. More details see ?exportImage.

# Visualize above Reaction
exportImage("R-HSA-1839098", output = "reaction", format = "jpg", quality = 10)


PhysicalEntity/Event to Events

Given either a PhysicalEntity or an Event, the top-level pathways or lower-level pathways that contain it can be retrieved by function getPathways. In this example, we try with the Complex “Unwinding complex at replication fork [nucleoplasm]” with identifier R-HSA-176949.

# get lower-level pathways (default)
# get top-level pathways
getPathways("R-HSA-176949", top.level = TRUE)

Non-Reactome id to Entities

Given an identifier in non-Reactome resources, all relative ReferenceEntities could be retrieved by function map2RefEntities. Here we focus on gene TP53:

# Get the Reactome ReferenceEntity of id "TP53"
tp53.re <- map2RefEntities("TP53")
## List of 18
##  $ dbId               : int 69487
##  $ displayName        : chr "UniProt:P04637 TP53"
##  $ databaseName       : chr "UniProt"
##  $ identifier         : chr "P04637"
##  $ name               :List of 1
##   ..$ : chr "TP53"
##  $ otherIdentifier    :List of 1
##   ..$ : c