Title: | Client for the Reactome Analysis Service for comparative multi-omics gene set analysis |
---|---|
Description: | The ReactomeGSA packages uses Reactome's online analysis service to perform a multi-omics gene set analysis. The main advantage of this package is, that the retrieved results can be visualized using REACTOME's powerful webapplication. Since Reactome's analysis service also uses R to perfrom the actual gene set analysis you will get similar results when using the same packages (such as limma and edgeR) locally. Therefore, if you only require a gene set analysis, different packages are more suited. |
Authors: | Johannes Griss [aut, cre] |
Maintainer: | Johannes Griss <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.21.2 |
Built: | 2024-11-28 03:51:52 UTC |
Source: | https://github.com/bioc/ReactomeGSA |
Adds a dataset to the analysis request
add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
request |
The request to add the dataset to. Commonly a |
expression_values |
Object containing the expression values of the dataset to add (multiple types supported). |
name |
character. Name of the dataset. This must be unique within one request. |
type |
character. The type of the dataset. Get available types using |
comparison_factor |
character. The name of the sample property to use for the main comparison. The sample properties
are either retrieved from |
comparison_group_1 |
character. Name of the first group within |
comparison_group_2 |
character. Name of the second group within |
sample_data |
data.frame (optional) data.frame containing the sample metadata of the |
additional_factors |
vector. Vector of additional sample properties that are used as blocking factors (if supported by the chosen analysis method) in the gene set analysis. |
overwrite |
boolean. If set to |
... |
Additional parameters passed to downstream functions. See the respective documentation of whether any additional parameters are supported. |
The ReactomeAnalysisRequest
object with the added dataset
Other add_dataset methods:
add_dataset,ReactomeAnalysisRequest,DGEList-method
,
add_dataset,ReactomeAnalysisRequest,EList-method
,
add_dataset,ReactomeAnalysisRequest,ExpressionSet-method
,
add_dataset,ReactomeAnalysisRequest,data.frame-method
,
add_dataset,ReactomeAnalysisRequest,matrix-method
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
Adds a dataset to the analysis request
## S4 method for signature 'ReactomeAnalysisRequest,data.frame' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
## S4 method for signature 'ReactomeAnalysisRequest,data.frame' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
request |
ReactomeAnalysisRequest. |
expression_values |
data.frame. In this case, the |
name |
character. Name of the dataset. This must be unique within one request. |
type |
character. The type of the dataset. Get available types using |
comparison_factor |
character. The name of the sample property to use for the main comparison. The sample properties
are either retrieved from |
comparison_group_1 |
character. Name of the first group within |
comparison_group_2 |
character. Name of the second group within |
sample_data |
data.frame (optional) data.frame containing the sample metadata of the |
additional_factors |
vector. Vector of additional sample properties that are used as blocking factors (if supported by the chosen analysis method) in the gene set analysis. |
overwrite |
boolean. If set to |
... |
Additional parameters passed to downstream functions. See the respective documentation of whether any additional parameters are supported. |
The ReactomeAnalysisRequest
object with the added dataset
Other add_dataset methods:
add_dataset()
,
add_dataset,ReactomeAnalysisRequest,DGEList-method
,
add_dataset,ReactomeAnalysisRequest,EList-method
,
add_dataset,ReactomeAnalysisRequest,ExpressionSet-method
,
add_dataset,ReactomeAnalysisRequest,matrix-method
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
Adds a dataset to the analysis request
## S4 method for signature 'ReactomeAnalysisRequest,DGEList' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
## S4 method for signature 'ReactomeAnalysisRequest,DGEList' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
request |
ReactomeAnalysisRequest. |
expression_values |
DGEList Here, the sample_data is automaticall extracted from the |
name |
character. Name of the dataset. This must be unique within one request. |
type |
character. The type of the dataset. Get available types using |
comparison_factor |
character. The name of the sample property to use for the main comparison. The sample properties
are either retrieved from |
comparison_group_1 |
character. Name of the first group within |
comparison_group_2 |
character. Name of the second group within |
sample_data |
data.frame (optional) data.frame containing the sample metadata of the |
additional_factors |
vector. Vector of additional sample properties that are used as blocking factors (if supported by the chosen analysis method) in the gene set analysis. |
overwrite |
boolean. If set to |
... |
Additional parameters passed to downstream functions. See the respective documentation of whether any additional parameters are supported. |
The ReactomeAnalysisRequest
object with the added dataset
Other add_dataset methods:
add_dataset()
,
add_dataset,ReactomeAnalysisRequest,EList-method
,
add_dataset,ReactomeAnalysisRequest,ExpressionSet-method
,
add_dataset,ReactomeAnalysisRequest,data.frame-method
,
add_dataset,ReactomeAnalysisRequest,matrix-method
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
Adds a dataset to the analysis request
## S4 method for signature 'ReactomeAnalysisRequest,EList' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
## S4 method for signature 'ReactomeAnalysisRequest,EList' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
request |
ReactomeAnalysisRequest. |
expression_values |
EList. Here, the sample_data is automaticall extracted from the |
name |
character. Name of the dataset. This must be unique within one request. |
type |
character. The type of the dataset. Get available types using |
comparison_factor |
character. The name of the sample property to use for the main comparison. The sample properties
are either retrieved from |
comparison_group_1 |
character. Name of the first group within |
comparison_group_2 |
character. Name of the second group within |
sample_data |
data.frame (optional) data.frame containing the sample metadata of the |
additional_factors |
vector. Vector of additional sample properties that are used as blocking factors (if supported by the chosen analysis method) in the gene set analysis. |
overwrite |
boolean. If set to |
... |
Additional parameters passed to downstream functions. See the respective documentation of whether any additional parameters are supported. |
The ReactomeAnalysisRequest
object with the added dataset
Other add_dataset methods:
add_dataset()
,
add_dataset,ReactomeAnalysisRequest,DGEList-method
,
add_dataset,ReactomeAnalysisRequest,ExpressionSet-method
,
add_dataset,ReactomeAnalysisRequest,data.frame-method
,
add_dataset,ReactomeAnalysisRequest,matrix-method
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
Adds a dataset to the analysis request
## S4 method for signature 'ReactomeAnalysisRequest,ExpressionSet' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
## S4 method for signature 'ReactomeAnalysisRequest,ExpressionSet' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
request |
ReactomeAnalysisRequest. |
expression_values |
ExpressionSet. Here, the sample_data is automaticall extracted from the |
name |
character. Name of the dataset. This must be unique within one request. |
type |
character. The type of the dataset. Get available types using |
comparison_factor |
character. The name of the sample property to use for the main comparison. The sample properties
are either retrieved from |
comparison_group_1 |
character. Name of the first group within |
comparison_group_2 |
character. Name of the second group within |
sample_data |
data.frame (optional) data.frame containing the sample metadata of the |
additional_factors |
vector. Vector of additional sample properties that are used as blocking factors (if supported by the chosen analysis method) in the gene set analysis. |
overwrite |
boolean. If set to |
... |
Additional parameters passed to downstream functions. See the respective documentation of whether any additional parameters are supported. |
The ReactomeAnalysisRequest
object with the added dataset
Other add_dataset methods:
add_dataset()
,
add_dataset,ReactomeAnalysisRequest,DGEList-method
,
add_dataset,ReactomeAnalysisRequest,EList-method
,
add_dataset,ReactomeAnalysisRequest,data.frame-method
,
add_dataset,ReactomeAnalysisRequest,matrix-method
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
Adds a dataset to the analysis request
## S4 method for signature 'ReactomeAnalysisRequest,matrix' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
## S4 method for signature 'ReactomeAnalysisRequest,matrix' add_dataset( request, expression_values, name, type, comparison_factor, comparison_group_1, comparison_group_2, sample_data = NULL, additional_factors = NULL, overwrite = FALSE, ... )
request |
ReactomeAnalysisRequest. |
expression_values |
matrix. In this case, the |
name |
character. Name of the dataset. This must be unique within one request. |
type |
character. The type of the dataset. Get available types using |
comparison_factor |
character. The name of the sample property to use for the main comparison. The sample properties
are either retrieved from |
comparison_group_1 |
character. Name of the first group within |
comparison_group_2 |
character. Name of the second group within |
sample_data |
data.frame (optional) data.frame containing the sample metadata of the |
additional_factors |
vector. Vector of additional sample properties that are used as blocking factors (if supported by the chosen analysis method) in the gene set analysis. |
overwrite |
boolean. If set to |
... |
Additional parameters passed to downstream functions. See the respective documentation of whether any additional parameters are supported. |
The ReactomeAnalysisRequest
object with the added dataset
Other add_dataset methods:
add_dataset()
,
add_dataset,ReactomeAnalysisRequest,DGEList-method
,
add_dataset,ReactomeAnalysisRequest,EList-method
,
add_dataset,ReactomeAnalysisRequest,ExpressionSet-method
,
add_dataset,ReactomeAnalysisRequest,data.frame-method
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") # since the expression_values object is a limma EList object, the sample_data is # retrieved from there # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id"))
Analyses cell clusters of a single-cell RNA-sequencing experiment to get pathway-level expressions for every cluster of cells.
analyse_sc_clusters( object, use_interactors = TRUE, include_disease_pathways = FALSE, create_reactome_visualization = FALSE, create_reports = FALSE, report_email = NULL, verbose = FALSE, ... )
analyse_sc_clusters( object, use_interactors = TRUE, include_disease_pathways = FALSE, create_reactome_visualization = FALSE, create_reports = FALSE, report_email = NULL, verbose = FALSE, ... )
object |
The object containing the single-cell RNA-sequencing data. |
use_interactors |
If set (default), protein-protein interactors from IntAct are used to extend Reactome pathways. |
include_disease_pathways |
If set, disease pathways are included as well. Disease pathways in Reactome follow a different annotation approach and can therefore lead to inaccurate results. |
create_reactome_visualization |
If set, the interactive visualization in Reactome's PathwayBrowser is created. |
create_reports |
If set, PDF and Microsoft Excel reports are created. Links to these report files are send to the supplied e-mail address. |
report_email |
The e-mail address to which reports should be sent to. |
verbose |
If set, additional status messages are printed. |
... |
Parameters passed to the specific implementation. Detailed documentations can be found there. |
There are currently two specific implementations of
this function, one to support Seurat
objects
and one to support Bioconductor's SingleCellExperiment
class.
A ReactomeAnalysisResult
object.
# This example shows how a Seurat object can be analysed # the approach is identical for SingleCellExperiment objects library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
# This example shows how a Seurat object can be analysed # the approach is identical for SingleCellExperiment objects library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
Analyses cell clusters of a single-cell RNA-sequencing experiment to get pathway-level expressions for every cluster of cells.
## S4 method for signature 'Seurat' analyse_sc_clusters( object, use_interactors = TRUE, include_disease_pathways = FALSE, create_reactome_visualization = FALSE, create_reports = FALSE, report_email = NULL, verbose = FALSE, assay = "RNA", slot = "counts", ... )
## S4 method for signature 'Seurat' analyse_sc_clusters( object, use_interactors = TRUE, include_disease_pathways = FALSE, create_reactome_visualization = FALSE, create_reports = FALSE, report_email = NULL, verbose = FALSE, assay = "RNA", slot = "counts", ... )
object |
The |
use_interactors |
If set (default), protein-protein interactors from IntAct are used to extend Reactome pathways. |
include_disease_pathways |
If set, disease pathways are included as well. Disease pathways in Reactome follow a different annotation approach and can therefore lead to inaccurate results. |
create_reactome_visualization |
If set, the interactive visualization in Reactome's PathwayBrowser is created. |
create_reports |
If set, PDF and Microsoft Excel reports are created. Links to these report files are send to the supplied e-mail address. |
report_email |
The e-mail address to which reports should be sent to. |
verbose |
If set, additional status messages are printed. |
assay |
By default, the "RNA" assay is used, which contains the original read counts. |
slot |
The slot in the Seurat object to use. Default and recommended approach is to use the raw counts. |
... |
Parameters passed to the specific implementation. Detailed documentations can be found there. |
There are currently two specific implementations of
this function, one to support Seurat
objects
and one to support Bioconductor's SingleCellExperiment
class.
A ReactomeAnalysisResult
object.
# This example shows how a Seurat object can be analysed # the approach is identical for SingleCellExperiment objects library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
# This example shows how a Seurat object can be analysed # the approach is identical for SingleCellExperiment objects library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
Analyses cell clusters of a single-cell RNA-sequencing experiment to get pathway-level expressions for every cluster of cells.
## S4 method for signature 'SingleCellExperiment' analyse_sc_clusters( object, use_interactors = TRUE, include_disease_pathways = FALSE, create_reactome_visualization = FALSE, create_reports = FALSE, report_email = NULL, verbose = FALSE, cell_ids, ... )
## S4 method for signature 'SingleCellExperiment' analyse_sc_clusters( object, use_interactors = TRUE, include_disease_pathways = FALSE, create_reactome_visualization = FALSE, create_reports = FALSE, report_email = NULL, verbose = FALSE, cell_ids, ... )
object |
The |
use_interactors |
If set (default), protein-protein interactors from IntAct are used to extend Reactome pathways. |
include_disease_pathways |
If set, disease pathways are included as well. Disease pathways in Reactome follow a different annotation approach and can therefore lead to inaccurate results. |
create_reactome_visualization |
If set, the interactive visualization in Reactome's PathwayBrowser is created. |
create_reports |
If set, PDF and Microsoft Excel reports are created. Links to these report files are send to the supplied e-mail address. |
report_email |
The e-mail address to which reports should be sent to. |
verbose |
If set, additional status messages are printed. |
cell_ids |
A factor specifying the group to which each cell belongs. For example, |
... |
Parameters passed to scater's |
There are currently two specific implementations of
this function, one to support Seurat
objects
and one to support Bioconductor's SingleCellExperiment
class.
A ReactomeAnalysisResult
object.
# This example shows how a Seurat object can be analysed # the approach is identical for SingleCellExperiment objects library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
# This example shows how a Seurat object can be analysed # the approach is identical for SingleCellExperiment objects library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
Introduce a line break in the middle of a long name.
break_names(the_names, long_name_limit = 46)
break_names(the_names, long_name_limit = 46)
the_names |
A vector of names |
long_name_limit |
The limit to define a long name (defautl 46 chars.) |
The list of adapted names
Makes sure the passed URL is valid. If not URL is passed, the one stored in the options is retrieved
check_reactome_url(reactome_url)
check_reactome_url(reactome_url)
reactome_url |
character The URL to test. If |
character The potentially cleaned / retrieved URL with a trailing "/"
Check's if a ReactomeAnalysisRequest object is valid
checkRequestValidity(object)
checkRequestValidity(object)
object |
The request object to check. |
TRUE if the object is valid or a string with the reason why it is not
Convert the Reactome JSON result to a ReactomeAnalysisResult object
convert_reactome_result(reactome_result)
convert_reactome_result(reactome_result)
reactome_result |
The JSON result already converted to R objects (name list) |
A ReactomeAnalysisResult
object
A data.frame is converted into a single string using '\t' (the characters, not tab) as field delimiter and '\n' (the characters, not newline) as line delimiter
data_frame_as_string(data)
data_frame_as_string(data)
data |
The data.frame to convert |
A string representing the passed data.frame
Loads an already available public dataset from ReactomeGSA and returns it as a Biobase::ExpressionSet object.
fetch_public_data(dataset_entry, reactome_url)
fetch_public_data(dataset_entry, reactome_url)
dataset_entry |
The entry of the respective dataset as returned by
the |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
The loaded data as an ExpressionSet object.
Search for a public dataset in the resources supported by ReactomeGSA as external data sources.
find_public_datasets( search_term, species = "Homo sapiens", reactome_url = NULL )
find_public_datasets( search_term, species = "Homo sapiens", reactome_url = NULL )
search_term |
The search terms as a single string. Multiple words (seperated by a space) are combined by an "AND". |
species |
Limit the search to selected species. The complete list of available species can be
retrieved through |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
A data.frame containing a list of datasets found through the search.
# search for any public dataset relating to BRAF in melanoma melanoma_datasets <- find_public_datasets("melanoma braf") # it is also possible to limit this to another species than human melanoma_mouse <- find_public_datasets("melanoma", species = "Mus musculus") # the list of available species can be retrieved using get_public_species all_species <- get_public_species() # datasets can then be loaded using the load_public_dataset function
# search for any public dataset relating to BRAF in melanoma melanoma_datasets <- find_public_datasets("melanoma braf") # it is also possible to limit this to another species than human melanoma_mouse <- find_public_datasets("melanoma", species = "Mus musculus") # the list of available species can be retrieved using get_public_species all_species <- get_public_species() # datasets can then be loaded using the load_public_dataset function
The pseudobulk data is generated using the
generate_pseudo_bulk_data
function.
generate_metadata(pseudo_bulk_data)
generate_metadata(pseudo_bulk_data)
pseudo_bulk_data |
Pseudobulk data generated from the
|
Metadata table for later use
generate_pseudo_bulk_data
for
generating pseudobulk data.
# Example pseudobulk data pseudo_bulk_data <- data.frame( sample1_groupA = c(10, 20, 30), sample2_groupA = c(15, 25, 35), sample3_groupB = c(5, 10, 15) ) # Generate metadata from pseudobulk data metadata <- generate_metadata(pseudo_bulk_data)
# Example pseudobulk data pseudo_bulk_data <- data.frame( sample1_groupA = c(10, 20, 30), sample2_groupA = c(15, 25, 35), sample3_groupB = c(5, 10, 15) ) # Generate metadata from pseudobulk data metadata <- generate_metadata(pseudo_bulk_data)
Generate metadata
## S4 method for signature 'data.frame' generate_metadata(pseudo_bulk_data)
## S4 method for signature 'data.frame' generate_metadata(pseudo_bulk_data)
pseudo_bulk_data |
Pseudobulk data generated from the
|
Returns metadata table for later use
generate_pseudo_bulk_data
generate_pseudo_bulk_data( object, group_by = NULL, split_by = "random", k_variable = 4 )
generate_pseudo_bulk_data( object, group_by = NULL, split_by = "random", k_variable = 4 )
object |
The Seurat or SingleCellExperiment object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
split_by |
variable -> split by a variable within the metadata; k must be a string random -> splits based on a random number; k must be a number Louvain, Louvain_multilevel, SLM, Leiden -> subclusters k must be a list with [resolution, cluster_1, cluster_2] |
k_variable |
variable dependent on the split_by |
returns pseudo bulk generated data
#using SCE object library("scRNAseq") SCE_OBJECT <- ZeiselBrainData() # generating pseudo bulk data using the SCE object above, # and clustering level level1class from the metadata # generate pseudo bulk data based on random subsampling SCE_RESULT_RANDOM <- generate_pseudo_bulk_data(SCE_OBJECT, group_by = "level1class", split_by = "random", k_variable = 5) # generate pseudo bulk data based on variable within the metadata SCE_RESULT_VARIABLE <- generate_pseudo_bulk_data(SCE_OBJECT, "level1class","variable","tissue")
#using SCE object library("scRNAseq") SCE_OBJECT <- ZeiselBrainData() # generating pseudo bulk data using the SCE object above, # and clustering level level1class from the metadata # generate pseudo bulk data based on random subsampling SCE_RESULT_RANDOM <- generate_pseudo_bulk_data(SCE_OBJECT, group_by = "level1class", split_by = "random", k_variable = 5) # generate pseudo bulk data based on variable within the metadata SCE_RESULT_VARIABLE <- generate_pseudo_bulk_data(SCE_OBJECT, "level1class","variable","tissue")
Generate Pseudo Bulk Data for Seurat Objects
## S4 method for signature 'Seurat' generate_pseudo_bulk_data( object, group_by = NULL, split_by = "random", k_variable = 4 )
## S4 method for signature 'Seurat' generate_pseudo_bulk_data( object, group_by = NULL, split_by = "random", k_variable = 4 )
object |
The object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
split_by |
variable -> split by a variable within the metadata; k must be a string random -> splits based on a random number; k must be a number Louvain, Louvain_multilevel, SLM, Leiden -> subclusters k must be a list with [resolution, cluster_1, cluster_2] |
k_variable |
variable dependent on the split_by |
returns pseudo bulk generated data
generate_pseudo_bulk_data - SingleCellExperiment
## S4 method for signature 'SingleCellExperiment' generate_pseudo_bulk_data( object, group_by = NULL, split_by = "random", k_variable = 4 )
## S4 method for signature 'SingleCellExperiment' generate_pseudo_bulk_data( object, group_by = NULL, split_by = "random", k_variable = 4 )
object |
The SingleCellExperiment object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
split_by |
variable -> split by a variable within the metadata; k must be a string random -> splits based on a random number; k must be a number subclustering [resolution, cluster_1, cluster_2] |
k_variable |
variable dependent on the split_by |
returns pseudo bulk generated data
Retrieves the status of the submitted dataset loading request
get_dataset_loading_status(loading_id, reactome_url = NULL)
get_dataset_loading_status(loading_id, reactome_url = NULL)
loading_id |
The dataset loading process' id |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
A list containing the id
, status
(can be "running", "complete", "failed"),
description
, and completed
(numeric between 0 - 1)
Retrieve the fold-changes for all pathways of the defined dataset
get_fc_for_dataset(dataset, pathway_result)
get_fc_for_dataset(dataset, pathway_result)
dataset |
Name of the dataset to retrieve the fold changes for. |
pathway_result |
The data.frame created by the |
A vector of fold-changes
Determines how significant a pathway is across the datasets. Returns the lowest significance.
get_is_sig_dataset(dataset, pathway_result)
get_is_sig_dataset(dataset, pathway_result)
dataset |
Name of the dataset |
pathway_result |
data.frame created by the |
A vector with 3=non-significant, 2=p<=0.05, 1=p<0.01
Return the list of found species labels in the supported public data resources
get_public_species(reactome_url = NULL)
get_public_species(reactome_url = NULL)
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
A vector of species strings.
# get the available species available_species <- get_public_species() # inspect the first 1 - 3 entries available_species[1:3]
# get the available species available_species <- get_public_species() # inspect the first 1 - 3 entries available_species[1:3]
perform_reactome_analysis
The result is only available if get_reactome_analysis_status
indicates that the
analysis is complete.
get_reactome_analysis_result(analysis_id, reactome_url = NULL)
get_reactome_analysis_result(analysis_id, reactome_url = NULL)
analysis_id |
The running analysis' id |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
The result object
start_reactome_analysis
Retrieves the status of the submitted analysis using start_reactome_analysis
get_reactome_analysis_status(analysis_id, reactome_url = NULL)
get_reactome_analysis_status(analysis_id, reactome_url = NULL)
analysis_id |
The running analysis' id |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
A list containing the id
, status
(can be "running", "complete", "failed"),
description
, and completed
(numeric between 0 - 1)
ReactomeGSA supported data types
get_reactome_data_types( print_types = TRUE, return_result = FALSE, reactome_url = NULL )
get_reactome_data_types( print_types = TRUE, return_result = FALSE, reactome_url = NULL )
print_types |
If set to |
return_result |
If set to |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
A data.frame
containing one row per data type with its id
and description
.
Johannes Griss
Other Reactome Service functions:
get_reactome_methods()
# retrieve the avialable data types available_types <- get_reactome_data_types(print_types = FALSE, return_result = TRUE) # print all data type ids available_types$id # simply print the available methods get_reactome_data_types()
# retrieve the avialable data types available_types <- get_reactome_data_types(print_types = FALSE, return_result = TRUE) # print all data type ids available_types$id # simply print the available methods get_reactome_data_types()
Returns all available analysis methods from the Reactome analysis service.
get_reactome_methods( print_methods = TRUE, print_details = FALSE, return_result = FALSE, method = NULL, reactome_url = NULL )
get_reactome_methods( print_methods = TRUE, print_details = FALSE, return_result = FALSE, method = NULL, reactome_url = NULL )
print_methods |
If set to |
print_details |
If set to |
return_result |
If set to |
method |
If set to a method's id, only information for this method will be shown. This is especially useful if
detailed information about a single method should be retrieved. This does not affect the data returned
if |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
Every method has a type, a scope, and sometimes a list of allowed values. The type (string, int = integer, float) define
the expected data type. The scope defines at what level the parameter can be set. dataset level parameters
can be set at the dataset level (using the add_dataset
function) or at the analysis request level (using
set_parameters
). If these parameters are set at the analysis request level, this overwrites the default
value for all datasets. analysis and global level parameters must only be set at the analysis request level
using set_parameters
. The difference between these two types of parameters is that while analysis
parameters influence the results, global parameters only influence the behaviour of the analysis system (for example
whether a Reactome visualization is created).
If return_result
is set to TRUE
, a data.frame with one row per method. Each method has a name, description, and
(optional) a list of parameters. Parameters again have a name, type, and description.
Johannes Griss
Other Reactome Service functions:
get_reactome_data_types()
# retrieve the available methods only in an object available_methods <- get_reactome_methods(print_methods = FALSE, return_result = TRUE) # print all method names available_methods$name # list all parameters for the first method first_method_parameters <- available_methods[1, "parameters"] first_method_parameters # simply print the available methods get_reactome_methods() # get the details for PADOG get_reactome_methods(print_details = TRUE, method = "PADOG")
# retrieve the available methods only in an object available_methods <- get_reactome_methods(print_methods = FALSE, return_result = TRUE) # print all method names available_methods$name # list all parameters for the first method first_method_parameters <- available_methods[1, "parameters"] first_method_parameters # simply print the available methods get_reactome_methods() # get the details for PADOG get_reactome_methods(print_details = TRUE, method = "PADOG")
Retrieves a result from a ReactomeAnalysisResult
object.
get_result(x, type, name)
get_result(x, type, name)
x |
ReactomeAnalysisResult. |
type |
the type of result. Use |
name |
the name of the result. Use |
A data.frame
containing the respective result.
Other ReactomeAnalysisResult functions:
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the available result types result_types(griss_melanoma_result) # get the dataset names names(griss_melanoma_result) # get the fold_changes for the first dataset prot_fc <- get_result(griss_melanoma_result, type = "fold_changes", name = "proteomics") head(prot_fc)
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the available result types result_types(griss_melanoma_result) # get the dataset names names(griss_melanoma_result) # get the fold_changes for the first dataset prot_fc <- get_result(griss_melanoma_result, type = "fold_changes", name = "proteomics") head(prot_fc)
Retrieves a result from a ReactomeAnalysisResult
object.
## S4 method for signature 'ReactomeAnalysisResult' get_result(x, type, name)
## S4 method for signature 'ReactomeAnalysisResult' get_result(x, type, name)
x |
ReactomeAnalysisResult. |
type |
the type of result. Use |
name |
the name of the result. Use |
A data.frame
containing the respective result.
Other ReactomeAnalysisResult functions:
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the available result types result_types(griss_melanoma_result) # get the dataset names names(griss_melanoma_result) # get the fold_changes for the first dataset prot_fc <- get_result(griss_melanoma_result, type = "fold_changes", name = "proteomics") head(prot_fc)
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the available result types result_types(griss_melanoma_result) # get the dataset names names(griss_melanoma_result) # get the fold_changes for the first dataset prot_fc <- get_result(griss_melanoma_result, type = "fold_changes", name = "proteomics") head(prot_fc)
is_gsva_result
is_gsva_result(object)
is_gsva_result(object)
object |
A |
Boolean indicating whether the object is a GSVA result.
Loads a public dataset that was found through the
find_public_datasets
function. The dataset
is returned as a Biobase ExpressionSet object.
load_public_dataset(dataset_entry, verbose = FALSE, reactome_url = NULL)
load_public_dataset(dataset_entry, verbose = FALSE, reactome_url = NULL)
dataset_entry |
The entry of the respective dataset as returned by
the |
verbose |
If set to |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
The loaded data as an ExpressionSet object.
# As a first step, you need to find available datasets available_datasets <- find_public_datasets("psoriasis tnf") # have a quick look at the found datasets available_datasets[, c("id", "title")] # load the first one, use the whole row of the found datasets # data.frame as the parameter dataset_1 <- load_public_dataset(available_datasets[1,], verbose = TRUE)
# As a first step, you need to find available datasets available_datasets <- find_public_datasets("psoriasis tnf") # have a quick look at the found datasets available_datasets[, c("id", "title")] # load the first one, use the whole row of the found datasets # data.frame as the parameter dataset_1 <- load_public_dataset(available_datasets[1,], verbose = TRUE)
Retrieves the names of the contained datasets within an ReactomeAnalysisResult
object.
## S4 method for signature 'ReactomeAnalysisResult' names(x)
## S4 method for signature 'ReactomeAnalysisResult' names(x)
x |
ReactomeAnalysisResult. |
character vector with the names of the contained datasets
Other ReactomeAnalysisResult functions:
get_result()
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the names of the available datasets names(griss_melanoma_result)
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the names of the available datasets names(griss_melanoma_result)
Opens the specified Reactome visualization in the system's default browser.
open_reactome(x, ...)
open_reactome(x, ...)
x |
ReactomeAnalysisResult. |
... |
Additional parameters passed to downstream functions. |
The opened link
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# Note: This function only works with a newly created result # since the visualization links only stay active for 7 days # load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the reactome link - this does only work # with new results # open_reactome(griss_melanoma_result)
# Note: This function only works with a newly created result # since the visualization links only stay active for 7 days # load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the reactome link - this does only work # with new results # open_reactome(griss_melanoma_result)
Opens the specified Reactome visualization in the system's default browser.
## S4 method for signature 'ReactomeAnalysisResult' open_reactome(x, n_visualization = 1, ...)
## S4 method for signature 'ReactomeAnalysisResult' open_reactome(x, n_visualization = 1, ...)
x |
ReactomeAnalysisResult. |
n_visualization |
numeric The index of the visualization to display (default |
... |
Additional parameters passed to downstream functions. |
The opened link
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# Note: This function only works with a newly created result # since the visualization links only stay active for 7 days # load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the reactome link - this does only work # with new results # open_reactome(griss_melanoma_result)
# Note: This function only works with a newly created result # since the visualization links only stay active for 7 days # load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the reactome link - this does only work # with new results # open_reactome(griss_melanoma_result)
Combines and returns the pathways of all analysed datasets.
pathways(x, ...)
pathways(x, ...)
x |
ReactomeAnalysisResult. |
... |
Additional parameters for specific implementations. |
A data.frame
containing all merged pathways.
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the combined pathway result pathway_result <- pathways(griss_melanoma_result) head(pathway_result)
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the combined pathway result pathway_result <- pathways(griss_melanoma_result) head(pathway_result)
Combines and returns the pathways of all analysed datasets.
## S4 method for signature 'ReactomeAnalysisResult' pathways(x, p = 0.01, order_by = NULL, ...)
## S4 method for signature 'ReactomeAnalysisResult' pathways(x, p = 0.01, order_by = NULL, ...)
x |
ReactomeAnalysisResult. |
p |
Minimum p-value to accept a pathway as significantly regulated. Default is 0.01. |
order_by |
Name of the dataset to sort the result list by. By default, the results are sorted based on the first dataset. |
... |
Additional parameters for specific implementations. |
A data.frame
containing all merged pathways.
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the combined pathway result pathway_result <- pathways(griss_melanoma_result) head(pathway_result)
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the combined pathway result pathway_result <- pathways(griss_melanoma_result) head(pathway_result)
This function wraps all steps required to perform
an Analysis using the Reactome Analysis Service. It submits
the passed ReactomeAnalysisRequest
object to the
Reactome Analysis Service API, checks the submitted analysis'
status and returns the result once the analysis is complete.
perform_reactome_analysis( request, verbose = TRUE, compress = TRUE, reactome_url = NULL )
perform_reactome_analysis( request, verbose = TRUE, compress = TRUE, reactome_url = NULL )
request |
|
verbose |
logical. If |
compress |
logical. If |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
The analysis' result
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) my_request <- ReactomeAnalysisRequest(method = "Camera") # set maximum missing values to 0.5 and do not create any reactome visualizations my_request <- set_parameters(request = my_request, max_missing_values = 0.5, create_reactome_visualization = FALSE) # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id")) # perform the analysis my_result <- perform_reactome_analysis(request = my_request, verbose = FALSE)
# create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics) my_request <- ReactomeAnalysisRequest(method = "Camera") # set maximum missing values to 0.5 and do not create any reactome visualizations my_request <- set_parameters(request = my_request, max_missing_values = 0.5, create_reactome_visualization = FALSE) # add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id")) # perform the analysis my_result <- perform_reactome_analysis(request = my_request, verbose = FALSE)
Plots correlations of the average fold-changes of all pathways between the different datasets. This function is only available to GSA based results (not GSVA ones).
plot_correlations(x, hide_non_sig = FALSE)
plot_correlations(x, hide_non_sig = FALSE)
x |
ReactomeAnalysisResult. The result object to use as input |
hide_non_sig |
If set, non-significant pathways are not shown. |
A list of ggplot2 plot objects representing one plot per combination
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the correlation plots plot_objs <- plot_correlations(griss_melanoma_result) # only one plot created for this result as it contains two datasets length(plot_objs) # show the plot using `print(plot_objs[[1]])`
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the correlation plots plot_objs <- plot_correlations(griss_melanoma_result) # only one plot created for this result as it contains two datasets length(plot_objs) # show the plot using `print(plot_objs[[1]])`
Plots correlations of the average fold-changes of all pathways between the different datasets. This function is only available to GSA based results (not GSVA ones).
## S4 method for signature 'ReactomeAnalysisResult' plot_correlations(x, hide_non_sig = FALSE)
## S4 method for signature 'ReactomeAnalysisResult' plot_correlations(x, hide_non_sig = FALSE)
x |
ReactomeAnalysisResult. The result object to use as input |
hide_non_sig |
If set, non-significant pathways are not shown. |
A list of ggplot2 plot objects representing one plot per combination
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the correlation plots plot_objs <- plot_correlations(griss_melanoma_result) # only one plot created for this result as it contains two datasets length(plot_objs) # show the plot using `print(plot_objs[[1]])`
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the correlation plots plot_objs <- plot_correlations(griss_melanoma_result) # only one plot created for this result as it contains two datasets length(plot_objs) # show the plot using `print(plot_objs[[1]])`
Plots pathway expression values / sample as a heatmap. Ranks pathways based on their expression difference.
plot_gsva_heatmap( object, pathway_ids = NULL, max_pathways = 20, truncate_names = TRUE, ... )
plot_gsva_heatmap( object, pathway_ids = NULL, max_pathways = 20, truncate_names = TRUE, ... )
object |
The |
pathway_ids |
A vector of pathway ids. If set, only these pathways are included in the plot. |
max_pathways |
The maximum number of pathways to include. Only takes effect if |
truncate_names |
If set, long pathway names are truncated. |
... |
Additional parameters passed to specific implementations. |
None
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE) # plot the heatmap relevant_pathways <- c("R-HSA-983170", "R-HSA-388841", "R-HSA-2132295", "R-HSA-983705", "R-HSA-5690714") plot_gsva_heatmap(gsva_result, pathway_ids = relevant_pathways, # limit to these pathways margins = c(6,30), # adapt the figure margins in heatmap.2 dendrogram = "col", # only plot column dendrogram scale = "row", # scale for each pathway key = FALSE, # don't display the color key lwid=c(0.1,4)) # remove the white space on the left
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE) # plot the heatmap relevant_pathways <- c("R-HSA-983170", "R-HSA-388841", "R-HSA-2132295", "R-HSA-983705", "R-HSA-5690714") plot_gsva_heatmap(gsva_result, pathway_ids = relevant_pathways, # limit to these pathways margins = c(6,30), # adapt the figure margins in heatmap.2 dendrogram = "col", # only plot column dendrogram scale = "row", # scale for each pathway key = FALSE, # don't display the color key lwid=c(0.1,4)) # remove the white space on the left
Plots pathway expression values / sample as a heatmap. Ranks pathways based on their expression difference.
## S4 method for signature 'ReactomeAnalysisResult' plot_gsva_heatmap( object, pathway_ids = NULL, max_pathways = 20, truncate_names = TRUE, ... )
## S4 method for signature 'ReactomeAnalysisResult' plot_gsva_heatmap( object, pathway_ids = NULL, max_pathways = 20, truncate_names = TRUE, ... )
object |
The |
pathway_ids |
A vector of pathway ids. If set, only these pathways are included in the plot. |
max_pathways |
The maximum number of pathways to include. Only takes effect if |
truncate_names |
If set, long pathway names are truncated. |
... |
Additional parameters passed to the heatmap.2 function. |
None
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE) # plot the heatmap relevant_pathways <- c("R-HSA-983170", "R-HSA-388841", "R-HSA-2132295", "R-HSA-983705", "R-HSA-5690714") plot_gsva_heatmap(gsva_result, pathway_ids = relevant_pathways, # limit to these pathways margins = c(6,30), # adapt the figure margins in heatmap.2 dendrogram = "col", # only plot column dendrogram scale = "row", # scale for each pathway key = FALSE, # don't display the color key lwid=c(0.1,4)) # remove the white space on the left
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE) # plot the heatmap relevant_pathways <- c("R-HSA-983170", "R-HSA-388841", "R-HSA-2132295", "R-HSA-983705", "R-HSA-5690714") plot_gsva_heatmap(gsva_result, pathway_ids = relevant_pathways, # limit to these pathways margins = c(6,30), # adapt the figure margins in heatmap.2 dendrogram = "col", # only plot column dendrogram scale = "row", # scale for each pathway key = FALSE, # don't display the color key lwid=c(0.1,4)) # remove the white space on the left
Plots the expression of a specific pathway from a ssGSEA result.
plot_gsva_pathway(object, pathway_id, ...)
plot_gsva_pathway(object, pathway_id, ...)
object |
The |
pathway_id |
The pathway's id |
... |
Additional parameters for specific implementations. |
A ggplot2 plot object
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE) # create the plot plot_obj <- plot_gsva_pathway(gsva_result, "R-HSA-389542")
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE) # create the plot plot_obj <- plot_gsva_pathway(gsva_result, "R-HSA-389542")
Plots the expression of a specific pathway from a ssGSEA result.
## S4 method for signature 'ReactomeAnalysisResult' plot_gsva_pathway(object, pathway_id, ...)
## S4 method for signature 'ReactomeAnalysisResult' plot_gsva_pathway(object, pathway_id, ...)
object |
The |
pathway_id |
The pathway's id |
... |
Additional parameters for specific implementations. |
A ggplot2 plot object
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE) # create the plot plot_obj <- plot_gsva_pathway(gsva_result, "R-HSA-389542")
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE) # create the plot plot_obj <- plot_gsva_pathway(gsva_result, "R-HSA-389542")
Runs a Principal Component analysis (using prcomp
) on the samples
based on the pathway analysis results.
plot_gsva_pca(object, pathway_ids = NULL, ...)
plot_gsva_pca(object, pathway_ids = NULL, ...)
object |
A |
pathway_ids |
A character vector of pathway ids. If set, only these pathways will be used for the PCA analysis. |
... |
Additional paramters passed to specific implementations. |
A ggplot2 object representing the plot.
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
Runs a Principal Component analysis (using prcomp
) on the samples
based on the pathway analysis results.
## S4 method for signature 'ReactomeAnalysisResult' plot_gsva_pca(object, pathway_ids = NULL, ...)
## S4 method for signature 'ReactomeAnalysisResult' plot_gsva_pca(object, pathway_ids = NULL, ...)
object |
A |
pathway_ids |
A character vector of pathway ids. If set, only these pathways will be used for the PCA analysis. |
... |
Additional parameters are passed to |
A ggplot2 object representing the plot.
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
# load the scRNA-seq example data library(ReactomeGSA.data) data(jerby_b_cells) # perform the GSVA analysis gsva_result <- analyse_sc_clusters(jerby_b_cells, verbose = FALSE)
Creates a heatmap to show which pathways are up- and down-regulated in different datasets
plot_heatmap( x, fdr = 0.01, max_pathways = 30, break_long_names = TRUE, return_data = FALSE )
plot_heatmap( x, fdr = 0.01, max_pathways = 30, break_long_names = TRUE, return_data = FALSE )
x |
ReactomeAnalysisResult. The result object to use as input |
fdr |
numeric. The minimum FDR to consider a pathways as significantly regulated. (Default 0.01) |
max_pathways |
numeric. The maximum number of pathways to plot. Pathways
are sorted based on in how many datasets they are significantly regulated.
This has no effect if |
break_long_names |
logical. If set, long pathway names are broken into two lines. |
return_data |
logical. If set, only the plotting data, but not the plot object itself is returned. This can be used to create customized plots that use the same data structure. |
A ggplot2 plot object representing the heatmap of pathways
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the heatmap plot plot_obj <- plot_heatmap(griss_melanoma_result) # show the plot print(plot_obj)
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the heatmap plot plot_obj <- plot_heatmap(griss_melanoma_result) # show the plot print(plot_obj)
Creates a heatmap to show which pathways are up- and down-regulated in different datasets
## S4 method for signature 'ReactomeAnalysisResult' plot_heatmap( x, fdr = 0.01, max_pathways = 30, break_long_names = TRUE, return_data = FALSE )
## S4 method for signature 'ReactomeAnalysisResult' plot_heatmap( x, fdr = 0.01, max_pathways = 30, break_long_names = TRUE, return_data = FALSE )
x |
ReactomeAnalysisResult. The result object to use as input |
fdr |
numeric. The minimum FDR to consider a pathways as significantly regulated. (Default 0.01) |
max_pathways |
numeric. The maximum number of pathways to plot. Pathways
are sorted based on in how many datasets they are significantly regulated.
This has no effect if |
break_long_names |
logical. If set, long pathway names are broken into two lines. |
return_data |
logical. If set, only the plotting data, but not the plot object itself is returned. This can be used to create customized plots that use the same data structure. |
A ggplot2 plot object representing the heatmap of pathways
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_volcano()
,
reactome_links()
,
result_types()
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the heatmap plot plot_obj <- plot_heatmap(griss_melanoma_result) # show the plot print(plot_obj)
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the heatmap plot plot_obj <- plot_heatmap(griss_melanoma_result) # show the plot print(plot_obj)
Creates a volcano plot for the pathway analysis result. Every point represents one pathway, the x-axis the log fold-change and the y-axis the adjusted p-value (-log10).
plot_volcano(x, ...)
plot_volcano(x, ...)
x |
ReactomeAnalysisResult. The analysis result to plot the volcano plot for. |
... |
Additional parameters for specific implementations. |
This function is only available for GSA-based analysis results.
A ggplot2 plot object representing the volcano plot.
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
reactome_links()
,
result_types()
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the volcano plot for the first dataset plot_obj <- plot_volcano(griss_melanoma_result) # display the plot using `print(plot_obj)`
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the volcano plot for the first dataset plot_obj <- plot_volcano(griss_melanoma_result) # display the plot using `print(plot_obj)`
Creates a volcano plot for the pathway analysis result. Every point represents one pathway, the x-axis the log fold-change and the y-axis the adjusted p-value (-log10).
## S4 method for signature 'ReactomeAnalysisResult' plot_volcano(x, dataset = 1, ...)
## S4 method for signature 'ReactomeAnalysisResult' plot_volcano(x, dataset = 1, ...)
x |
ReactomeAnalysisResult. The analysis result to plot the volcano plot for. |
dataset |
The name or index of the dataset to plot (first one by default). |
... |
Additional parameters for specific implementations. |
This function is only available for GSA-based analysis results.
A ggplot2 plot object representing the volcano plot.
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
reactome_links()
,
result_types()
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the volcano plot for the first dataset plot_obj <- plot_volcano(griss_melanoma_result) # display the plot using `print(plot_obj)`
# load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # create the volcano plot for the first dataset plot_obj <- plot_volcano(griss_melanoma_result) # display the plot using `print(plot_obj)`
Shows a ReactomeAnalysisRequest
object summary.
## S4 method for signature 'ReactomeAnalysisRequest' print(x, ...)
## S4 method for signature 'ReactomeAnalysisRequest' print(x, ...)
x |
|
... |
Not used |
The classname of the object
library(methods) request <- ReactomeAnalysisRequest(method = "Camera") print(request) # add additional parameters request <- set_parameters(request, "max_missing_values" = 0.5) show(request)
library(methods) request <- ReactomeAnalysisRequest(method = "Camera") print(request) # add additional parameters request <- set_parameters(request, "max_missing_values" = 0.5) show(request)
Displays basic information about the ReactomeAnalysisResult
object.
## S4 method for signature 'ReactomeAnalysisResult' print(x, ...)
## S4 method for signature 'ReactomeAnalysisResult' print(x, ...)
x |
ReactomeAnalysisResult. |
... |
Not used |
character classname of the object
library(ReactomeGSA.data) data(griss_melanoma_result) print(griss_melanoma_result)
library(ReactomeGSA.data) data(griss_melanoma_result) print(griss_melanoma_result)
Displays detailed information about the result visualizations in Reactome.
reactome_links(x, ...)
reactome_links(x, ...)
x |
ReactomeAnalysisResult. |
... |
Additional parameters for specific implementations. |
If return_result
is set to TRUE
, a vector of the available visualizations.
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
result_types()
# Note: This function only works with a newly created result # since the visualization links only stay active for 7 days # load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the reactome link - this does only work # with new results reactome_links(griss_melanoma_result)
# Note: This function only works with a newly created result # since the visualization links only stay active for 7 days # load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the reactome link - this does only work # with new results reactome_links(griss_melanoma_result)
Displays detailed information about the result visualizations in Reactome.
## S4 method for signature 'ReactomeAnalysisResult' reactome_links(x, print_result = TRUE, return_result = FALSE)
## S4 method for signature 'ReactomeAnalysisResult' reactome_links(x, print_result = TRUE, return_result = FALSE)
x |
ReactomeAnalysisResult. |
print_result |
If set to |
return_result |
If |
If return_result
is set to TRUE
, a vector of the available visualizations.
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
result_types()
# Note: This function only works with a newly created result # since the visualization links only stay active for 7 days # load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the reactome link - this does only work # with new results reactome_links(griss_melanoma_result)
# Note: This function only works with a newly created result # since the visualization links only stay active for 7 days # load an example result library(ReactomeGSA.data) data(griss_melanoma_result) # get the reactome link - this does only work # with new results reactome_links(griss_melanoma_result)
This class is used to collect all information required to submit an analysis request to the Reactome Analysis System.
ReactomeAnalysisRequest(method) ReactomeAnalysisRequest(method)
ReactomeAnalysisRequest(method) ReactomeAnalysisRequest(method)
method |
character. Name of the method to use. |
A ReactomeAnalysisRequest object.
method
character. Name of the method to use
request_object
list. This slot should not be set manually. It stores the internal
request representation and should be modified using the classes' functions.
To add parameters, use set_parameters,ReactomeAnalysisRequest-method
library(ReactomeGSA.data) library(methods) # create the request method and specify its method request <- ReactomeAnalysisRequest(method = "Camera") # add a dataset to the request data(griss_melanoma_proteomics) request <- add_dataset(request = request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id")) # to launch the actual analysis use the perform_reactome_analysis function
library(ReactomeGSA.data) library(methods) # create the request method and specify its method request <- ReactomeAnalysisRequest(method = "Camera") # add a dataset to the request data(griss_melanoma_proteomics) request <- add_dataset(request = request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id")) # to launch the actual analysis use the perform_reactome_analysis function
A ReactomeAnalysisResult object contains the pathway analysis results of all submitted datasets at once.
This class represents a result retrieved from the Reactome Analysis Service. It is returned
by get_reactome_analysis_result
and its wrapper perform_reactome_analysis
.
Generally, object of this class should not be created manually.
A ReactomeAnalysisResult object.
reactome_release
The Reactome version used to create this result.
mappings
Stores the mapping results that were generated for this analysis.
results
A named list containing the actual analysis results for every dataset and possibly combined results as well.
reactome_links
Links pointing to reactome results as a list.
names
:
Retrieves the names of all datasets in the result object
result_types
:
Retrieves the available result types
pathways
:
Merges the pathway results of all analysed datasets.
get_result
:
Retrieve a specific result as data.frame
reactome_links
:
Displays / retrieves the URLs to the available visualizations in Reactome's pathway browser.
open_reactome
:
Opens the specified Reactome visualization in the system's default browser.
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # retrieve the names of all datasets in the result names(griss_melanoma_result) # get the combined pathway result pathway_result <- pathways(griss_melanoma_result) # check which result types are available result_types(griss_melanoma_result) # get the fold changes for the first dataset first_dataset_name <- names(griss_melanoma_result)[1] first_fc <- get_result(griss_melanoma_result, "fold_changes", first_dataset_name)
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # retrieve the names of all datasets in the result names(griss_melanoma_result) # get the combined pathway result pathway_result <- pathways(griss_melanoma_result) # check which result types are available result_types(griss_melanoma_result) # get the fold changes for the first dataset first_dataset_name <- names(griss_melanoma_result)[1] first_fc <- get_result(griss_melanoma_result, "fold_changes", first_dataset_name)
Remove the dataset from the ReactomeAnalysisRequest
object.
remove_dataset(x, dataset_name)
remove_dataset(x, dataset_name)
x |
The |
dataset_name |
character The dataset's name |
The updated ReactomeAnalysisRequest
Remove the dataset from the ReactomeAnalysisRequest
object.
## S4 method for signature 'ReactomeAnalysisRequest' remove_dataset(x, dataset_name)
## S4 method for signature 'ReactomeAnalysisRequest' remove_dataset(x, dataset_name)
x |
The |
dataset_name |
character The dataset's name |
The updated ReactomeAnalysisRequest
Retrieves the available result types for the ReactomeAnalysisResult
object. Currently,
the Reactome Analysis System supports pathways
and gene level fold_changes
as result types. Not all analysis methods return both data types though.
Use the names
function to find out which datasets are available
in the result object.
result_types(x)
result_types(x)
x |
ReactomeAnalysisResult. |
A cacharacter vector of result types.
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the available result types result_types(griss_melanoma_result)
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the available result types result_types(griss_melanoma_result)
Retrieves the available result types for the ReactomeAnalysisResult
object. Currently,
the Reactome Analysis System supports pathways
and gene level fold_changes
as result types. Not all analysis methods return both data types though.
Use the names
function to find out which datasets are available
in the result object.
## S4 method for signature 'ReactomeAnalysisResult' result_types(x)
## S4 method for signature 'ReactomeAnalysisResult' result_types(x)
x |
ReactomeAnalysisResult. |
A cacharacter vector of result types.
Other ReactomeAnalysisResult functions:
get_result()
,
names,ReactomeAnalysisResult-method
,
open_reactome()
,
pathways()
,
plot_correlations()
,
plot_gsva_heatmap()
,
plot_gsva_pathway()
,
plot_heatmap()
,
plot_volcano()
,
reactome_links()
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the available result types result_types(griss_melanoma_result)
# load an example result object library(ReactomeGSA.data) data(griss_melanoma_result) # get the available result types result_types(griss_melanoma_result)
Set the analysis method used by the ReactomeAnalysisRequest
set_method(request, method, ...)
set_method(request, method, ...)
request |
The |
method |
The name of the method to use. Use |
... |
Additional parameters passed to specific implementations |
The ReactomeAnalysisRequest
with the adapted method
# create a request using Camera as an analysis data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") print(my_request) # change the method to ssGSEA my_request <- set_method(my_request, "ssGSEA") print(my_request)
# create a request using Camera as an analysis data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") print(my_request) # change the method to ssGSEA my_request <- set_method(my_request, "ssGSEA") print(my_request)
Set the analysis method used by the ReactomeAnalysisRequest
## S4 method for signature 'ReactomeAnalysisRequest' set_method(request, method, ...)
## S4 method for signature 'ReactomeAnalysisRequest' set_method(request, method, ...)
request |
The |
method |
The name of the method to use. Use |
... |
Additional parameters passed to specific implementations |
The ReactomeAnalysisRequest
with the adapted method
# create a request using Camera as an analysis data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") print(my_request) # change the method to ssGSEA my_request <- set_method(my_request, "ssGSEA") print(my_request)
# create a request using Camera as an analysis data(griss_melanoma_proteomics) library(methods) my_request <- ReactomeAnalysisRequest(method = "Camera") print(my_request) # change the method to ssGSEA my_request <- set_method(my_request, "ssGSEA") print(my_request)
Sets the analysis parameters for the given ReactomeAnalysisRequest
. If the
parameter is already set, it is overwritten. Use get_reactome_methods
to get a list of all available parameters for each available method.
set_parameters(request, ...)
set_parameters(request, ...)
request |
The |
... |
Any name / value pair to set a parameter (see example). For a complete list of
available parameters use |
Both, parameters with the scope "dataset" as well as "analysis" can be set on the analysis level. In this case, these parameters overwrite the system's default values. If a parameter with the scope "dataset" is defined again at the dataset level, this value will overwrite the analysis' scope value for the given dataset.
The modified ReactomeAnalysisRequest
object
library(methods) # create a request object request <- ReactomeAnalysisRequest(method = "Camera") # add a parameter request <- set_parameters(request, max_missing_values = 0.5, discrete_norm_function = "TMM")
library(methods) # create a request object request <- ReactomeAnalysisRequest(method = "Camera") # add a parameter request <- set_parameters(request, max_missing_values = 0.5, discrete_norm_function = "TMM")
Sets the analysis parameters for the given ReactomeAnalysisRequest
. If the
parameter is already set, it is overwritten. Use get_reactome_methods
to get a list of all available parameters for each available method.
## S4 method for signature 'ReactomeAnalysisRequest' set_parameters(request, ...)
## S4 method for signature 'ReactomeAnalysisRequest' set_parameters(request, ...)
request |
The |
... |
Any name / value pair to set a parameter (see example). For a complete list of
available parameters use |
Both, parameters with the scope "dataset" as well as "analysis" can be set on the analysis level. In this case, these parameters overwrite the system's default values. If a parameter with the scope "dataset" is defined again at the dataset level, this value will overwrite the analysis' scope value for the given dataset.
The modified ReactomeAnalysisRequest
object
library(methods) # create a request object request <- ReactomeAnalysisRequest(method = "Camera") # add a parameter request <- set_parameters(request, max_missing_values = 0.5, discrete_norm_function = "TMM")
library(methods) # create a request object request <- ReactomeAnalysisRequest(method = "Camera") # add a parameter request <- set_parameters(request, max_missing_values = 0.5, discrete_norm_function = "TMM")
Shows a ReactomeAnalysisRequest
object summary.
## S4 method for signature 'ReactomeAnalysisRequest' show(object)
## S4 method for signature 'ReactomeAnalysisRequest' show(object)
object |
The classname of the object
library(methods) request <- ReactomeAnalysisRequest(method = "Camera") print(request) # add additional parameters request <- set_parameters(request, "max_missing_values" = 0.5) show(request)
library(methods) request <- ReactomeAnalysisRequest(method = "Camera") print(request) # add additional parameters request <- set_parameters(request, "max_missing_values" = 0.5) show(request)
Displays basic information about the ReactomeAnalysisResult
object.
## S4 method for signature 'ReactomeAnalysisResult' show(object)
## S4 method for signature 'ReactomeAnalysisResult' show(object)
object |
ReactomeAnalysisResult. |
character classname of the object
library(ReactomeGSA.data) data(griss_melanoma_result) show(griss_melanoma_result)
library(ReactomeGSA.data) data(griss_melanoma_result) show(griss_melanoma_result)
method implementation subclustering
split_clustering(seurat_object, group_by, res, alg, cluster1, cluster2)
split_clustering(seurat_object, group_by, res, alg, cluster1, cluster2)
seurat_object |
The Seurat object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
res |
The clustering resolution to use. |
alg |
Seurat subclustering algorithm id |
cluster1 |
cluster to subcluster |
cluster2 |
cluster to subcluster |
returns pseudo bulk generated data
split SCE Object with random pooling
split_random_sce(sce_object, group_by, k_variable)
split_random_sce(sce_object, group_by, k_variable)
sce_object |
The SingleCellExperiment object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
k_variable |
number of pools that should be created |
returns pseudo bulk generated data
split SCE Object with random pooling
split_subclustering_sce( sce_object, group_by, resolution, subcluster_ref, subcluster_comp )
split_subclustering_sce( sce_object, group_by, resolution, subcluster_ref, subcluster_comp )
sce_object |
The SingleCellExperiment object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
resolution |
resolution |
subcluster_ref |
cluster to subcluster as areference |
subcluster_comp |
cluster to subcluster for comparison |
returns pseudo bulk generated data
split Seurat object by variable
split_variable(seurat_object, group_by, k_variable)
split_variable(seurat_object, group_by, k_variable)
seurat_object |
The Seurat object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
k_variable |
variable dependent on the split_by -> meta data entry |
returns pseudo bulk generated data
split Seurat object by random pooling
split_variable_random(seurat_object, group_by, k_variable)
split_variable_random(seurat_object, group_by, k_variable)
seurat_object |
The Seurat object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
k_variable |
number of random pools |
returns pseudo bulk generated data
split SCE Object by variable
split_variable_sce(sce_object, group_by, k_variable)
split_variable_sce(sce_object, group_by, k_variable)
sce_object |
The SingleCellExperiment object to analyse. |
group_by |
entry in metadata table, based on these cluster annotation pseudo bulk is performed |
k_variable |
variable for sub setting must be in the metadata |
returns pseudo bulk generated data
Submits a ReactomeAnalysisRequest
to the Reactome Analysis Service API and
returns the analysis id of the submitted job.
start_reactome_analysis(request, compress = TRUE, reactome_url = NULL)
start_reactome_analysis(request, compress = TRUE, reactome_url = NULL)
request |
|
compress |
If set (default) the JSON request data is compressed using gzip. |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |
This function should only be used for very large requests that likely take a long time to complete.
By default, users should use the perform_reactome_analysis
function to run an analysis.
character The analysis job's id.
#' @examples # create a request using Camera as an analysis library(ReactomeGSA.data) data(griss_melanoma_proteomics)
my_request <- ReactomeAnalysisRequest(method = "Camera")
# set maximum missing values to 0.5 and do not create any reactome visualizations my_request <- set_parameters(request = my_request, max_missing_values = 0.5, create_reactome_visualization = FALSE)
# add the dataset my_request <- add_dataset(request = my_request, expression_values = griss_melanoma_proteomics, name = "Proteomics", type = "proteomics_int", comparison_factor = "condition", comparison_group_1 = "MOCK", comparison_group_2 = "MCM", additional_factors = c("cell.type", "patient.id")) # start the analysis analysis_id <- start_reactome_analysis(my_request)
This function loops until the dataset is available. If
verbose is set to TRUE
, the progress is displayed
in a status bar.
wait_for_loading_dataset(request, verbose, reactome_url)
wait_for_loading_dataset(request, verbose, reactome_url)
request |
The httr request object of the dataset loading request. |
verbose |
If set to |
reactome_url |
URL of the Reactome API Server. Overwrites the URL set in the 'reactome_gsa.url' option. Specific ports can be set using the standard URL specification (for example http://your.service:1234) |