Overview

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!

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:

## Total 2516 entries of Pathway with species Homo sapiens, retrieving 2516 of them...
## 
  |                                                                            
  |                                                                      |   0%

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:

## List of 24
##  $ dbId               : int 2033519
##  $ displayName        : chr "Activated point mutants of FGFR2"
##  $ stId               : chr "R-HSA-2033519"
##  $ stIdVersion        : chr "R-HSA-2033519.1"
##  $ 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:
##  $ hasDiagram         : logi FALSE
##  $ hasEHLD            : logi FALSE
##  $ hasEvent           :'data.frame': 10 obs. of  15 variables:
##  $ schemaClass        : chr "Pathway"
##  $ className          : 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:

## Searching for term 'bone development disease'... species:'Homo sapiens'

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):

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:

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.

Mappings

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.

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:

## 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
##   ..$ : chr [1:284] "0005670112" "11738335_x_at" "11748319_x_at" "11748599_a_at" ...
##  $ url                : chr "http://purl.uniprot.org/uniprot/P04637"
##  $ checksum           : chr "AD5C149FD8106131"
##  $ comment            :List of 1
##   ..$ : chr "FUNCTION Acts as a tumor suppressor in many tumor types; induces growth arrest or apoptosis depending on the ph"| __truncated__
##  $ description        :List of 1
##   ..$ : chr "recommendedName: Cellular tumor antigen p53  alternativeName: Antigen NY-CO-13  alternativeName: Phosphoprotein"| __truncated__
##  $ geneName           :List of 1
##   ..$ : chr [1:2] "TP53" "P53"
##  $ isSequenceChanged  : logi FALSE
##  $ keyword            :List of 1
##   ..$ : chr [1:31] "3D-structure" "Acetylation" "Activator" "Alternative promoter usage" ...
##  $ secondaryIdentifier:List of 1
##   ..$ : chr [1:27] "P53_HUMAN" "Q15086" "Q15087" "Q15088" ...
##  $ sequenceLength     : int 393
##  $ chain              :List of 1
##   ..$ : chr "chain:1-393"
##  $ schemaClass        : chr "ReferenceGeneProduct"
##  $ className          : chr "ReferenceGeneProduct"

This object is linked to UniProt with identifier P04637 and name TP53. Once the Reactome dbId of a non-Reactome identifier or name is obtained, the PhysicalEntities associated with this non-Reactome identifier can be fetched through retrieving all attributes using query:

Non-Reactome id to Events

Furthermore, non-Reactome identifiers could be mapped to Reactome Events with function map2Events, therefore we are able to get pathways associated with TP53. If you stick to the gene symbol, you should specify resource = "HGNC". Actually this is same as id = P04637, resource = "UniProt". For reactions, specify mapTo = "reactions".

Entity to non-Reactome ids

A recap for all slots of TP53 Reactome object:

## List of 25
##  $ dbId               : int 69487
##  $ displayName        : chr "UniProt:P04637 TP53"
##  $ modified           :List of 6
##  $ databaseName       : chr "UniProt"
##  $ identifier         : chr "P04637"
##  $ name               : chr "TP53"
##  $ otherIdentifier    : chr [1:284] "0005670112" "11738335_x_at" "11748319_x_at" "11748599_a_at" ...
##  $ url                : chr "http://purl.uniprot.org/uniprot/P04637"
##  $ crossReference     :'data.frame': 267 obs. of  7 variables:
##  $ referenceDatabase  :List of 7
##  $ physicalEntity     :'data.frame': 27 obs. of  15 variables:
##  $ checksum           : chr "AD5C149FD8106131"
##  $ comment            : chr "FUNCTION Acts as a tumor suppressor in many tumor types; induces growth arrest or apoptosis depending on the ph"| __truncated__
##  $ description        : chr "recommendedName: Cellular tumor antigen p53  alternativeName: Antigen NY-CO-13  alternativeName: Phosphoprotein"| __truncated__
##  $ geneName           : chr [1:2] "TP53" "P53"
##  $ isSequenceChanged  : logi FALSE
##  $ keyword            : chr [1:31] "3D-structure" "Acetylation" "Activator" "Alternative promoter usage" ...
##  $ secondaryIdentifier: chr [1:27] "P53_HUMAN" "Q15086" "Q15087" "Q15088" ...
##  $ sequenceLength     : int 393
##  $ species            : int 48887
##  $ chain              : chr "chain:1-393"
##  $ referenceGene      :'data.frame': 11 obs. of  9 variables:
##  $ referenceTranscript:'data.frame': 15 obs. of  9 variables:
##  $ schemaClass        : chr "ReferenceGeneProduct"
##  $ className          : chr "ReferenceGeneProduct"

Non-Reactome identifiers associated with a ReferenceEntity or PhysicalEntity can be found in these attributes of an instance:

  • identifier
  • otherIdentifier
  • crossReference
  • geneName
  • secondaryIdentifier
  • referenceGene
  • referenceTranscript

Event to non-Reactome ids

Non-Reactome identifiers (primaryIdentifier, secondaryIdentifier, and otherIdentifier) and gene symbols associated with an Event can also be retrieved by function event2Ids. Here we try with Reaction “Multiple proteins are localized at replication fork” (stId R-HSA-176942):

## List of 4
##  $ geneSymbol         : chr [1:30] "CDC45" "CDC45L" "CDC45L2" "UNQ374/PRO710" ...
##  $ primaryIdentifier  :'data.frame': 11 obs. of  2 variables:
##   ..$ dbId       : int [1:11] 86785 176969 356315 67522 99147 94945 94950 94954 94959 94964 ...
##   ..$ displayName: chr [1:11] "UniProt:O75419 CDC45" "UniProt:Q9BRT9 GINS4" "UniProt:Q9BRX5 GINS3" "UniProt:Q14691 GINS1" ...
##  $ secondaryIdentifier: chr [1:53] "CDC45_HUMAN" "B4DDB4" "B4DDU3" "E9PDH7" ...
##  $ otherIdentifier    : chr [1:888] "0000380402" "11719699_a_at" "11745049_a_at" "11751123_a_at" ...

Inferred events

Reactome uses the set of manually curated Human Reactions to computationally infer reactions in fourteen evolutionarily divergent eukaryotic species for which high-quality whole-genome sequence data are available. Therefore a set of high-quality inferred Pathways, Reactions, and PhysicalEntities (proteins) exists in these species. More details about computationally inferred events could be found here.

We can first look at a human pathway “Stabilization of p53” with identifier R-HSA-69541 and the orthologousEvent slot in its Reactome Pathway object.

Note that the isInferred value of this human instance is FALSE, while those of all its orthologous Events in other species are TRUE.

## [1] FALSE

Conversely, if you have a non-Human Event or PhysicalEntity instance and want to get all its orthologies in other species, you could use function getOrthology to fetch the Human orthologous instance first, then repeat the steps above:

  • query the result identifier
  • extract those in orthologousEvent attribute
## Returning inferred instances of 'R-SSC-69541' in species 'Homo sapiens'...
## $dbId
## [1] 69541
## 
## $displayName
## [1] "Stabilization of p53"
## 
## $stId
## [1] "R-HSA-69541"
## 
## $stIdVersion
## [1] "R-HSA-69541.5"
## 
## $isInDisease
## [1] FALSE
## 
## $isInferred
## [1] FALSE
## 
## $name
## [1] "Stabilization of p53"
## 
## $releaseDate
## [1] "2004-07-06"
## 
## $speciesName
## [1] "Homo sapiens"
## 
## $hasDiagram
## [1] FALSE
## 
## $hasEHLD
## [1] FALSE
## 
## $schemaClass
## [1] "Pathway"
## 
## $className
## [1] "Pathway"

Others

Diagram exporter

The Reactome diagram exporter has been mentioned a little bit in ‘Instances in Reactions’ section, here we can reconstruct a few more examples.

What’s more, Reactome offers a pathway Analysis Service that supports enrichment and expression analysis. The diagram exporter allows you to overlay the results of the analysis on top of the exported diagrams. To do so, use the token argument to specify the unique token associated with the performed analysis.

The ReactomeGSA package is an R client to the web-based Reactome Analysis Service, so we could perform analysis in R then access the token.

We could now directly get the diagram in R: