add_dataset-ReactomeAnalysisRequest-data.frame-method: add_dataset - data.frame

add_dataset,ReactomeAnalysisRequest,data.frame-methodR Documentation

add_dataset - data.frame

Description

Adds a dataset to the analysis request

Usage

## 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,
  ...
)

Arguments

request

ReactomeAnalysisRequest.

expression_values

data.frame. In this case, the sample_data must be set.

name

character. Name of the dataset. This must be unique within one request.

type

character. The type of the dataset. Get available types using get_reactome_data_types

comparison_factor

character. The name of the sample property to use for the main comparison. The sample properties are either retrieved from expression_values or from sample_data.

comparison_group_1

character. Name of the first group within comparison_factor to use for the comparison.

comparison_group_2

character. Name of the second group within comparison_factor to use for the comparison.

sample_data

data.frame (optional) data.frame containing the sample metadata of the expression_values. Depending on the object type of expression_values, this information can also be extracted from there.

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 TRUE, datasets with the same name will be overwritten

...

Additional parameters passed to downstream functions. See the respective documentation of whether any additional parameters are supported.

Value

The ReactomeAnalysisRequest object with the added dataset

See Also

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

Examples

# 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"))

reactome/ReactomeGSA documentation built on Nov. 9, 2024, 10:56 a.m.