runPipeline: Perform differential methylation analysis

Description Usage Arguments Details Value Examples

View source: R/runPipeline.R

Description

Wrapper for analysing differential methylation and expression at region and probe level.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
runPipeline(
  set,
  variable_names,
  covariable_names = NULL,
  model = NULL,
  weights = NULL,
  num_vars,
  sva = FALSE,
  betas = TRUE,
  range,
  analyses = c("DiffMean"),
  verbose = FALSE,
  warnings = TRUE,
  DiffMean_params = NULL,
  DiffVar_params = list(coefficient = 1:2),
  rda_params = NULL,
  method = "ls",
  big = FALSE
)

Arguments

set

GenomicRatioSet, eSet derived object or SummarizedExperiment

variable_names

Character vector with the names of the variables that will be returned as result.

covariable_names

Character vector with the names of the variables that will be used to adjust the model.

model

Model matrix or formula to get model matrix from set.

weights

weights used in the lmFit model (default NULL)

num_vars

Numeric with the number of variables in the matrix for which the analysis will be performed. Compulsory if equation is not null.

sva

Logical. Should Surrogate Variable Analysis be applied? (Default: FALSE)

betas

If set is a GenomicRatioSet, should beta values be used? (Default: TRUE)

range

GenomicRanges with the region used for RDA

analyses

Vector with the names of the analysis to be run (DiffMean and/or DiffVar).

verbose

Logical value. If TRUE, it writes out some messages indicating progress. If FALSE nothing should be printed.

warnings

Should warnings be displayed? (Default:TRUE)

DiffMean_params

List with other parameter passed to runBumphunter function.

DiffVar_params

List with other parameter passed to runBumphunter function.

rda_params

List with other parameter passed to runRDA function.

method

String indicating the method used in the regression: "ls" or "robust". (Default: "ls")

big

Logical value indicating whether SmartSVA should be instead of SVA (TRUE recommended for methylation or when having large number of samples). Default is FALSE.

Details

This function is the main wrapper of the package. First, it simplifies the the set to only contain the common samples between phenotype and features. In addition, it allows to change the class of the variables and to apply genomic models (more information on preparePhenotype). Afterwards, analysis per probe and per region are done merging the results in an AnalysisResults object.

Default linear model will contain a sum of the variables and covariables. If interactions are desired, a costum formula can be specified. In that case, variables and covariables must also be specified in order to assure the proper work of the resulting AnalysisResult. In addition, the number of variables of the model for which the calculation will be done must be specified.

Value

ResultSet object

Examples

1
2
3
4
5
if (require(minfiData)){
set <- ratioConvert(mapToGenome(MsetEx[1:10,]))
 res <- runPipeline(set, variable_names = "Sample_Group") 
 res
}

isglobal-brge/MEAL documentation built on May 8, 2021, 8:05 p.m.