Learn R Programming

MEAL (version 1.2.3)

DAPipeline: Perform differential methylation analysis

Description

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

Usage

DAPipeline(set, variable_names, variable_types = rep(NA, length(variable_names)), covariable_names = NULL, covariable_types = rep(NA, length(covariable_names)), equation = NULL, num_var = NULL, labels = NULL, sva = FALSE, region_methods = c("bumphunter", "DMRcate"), shrinkVar = FALSE, probe_method = "ls", max_iterations = 100, num_feat = 50, num_cores = 1, verbose = FALSE, ...)

Arguments

set
MethylationSet or ExpressionSet
variable_names
Character vector with the names of the variables that will be returned as result.
variable_types
Character vector with the types of the variables. As default, variables type won't be changed.
covariable_names
Character vector with the names of the variables that will be used to adjust the model.
covariable_types
Character vector with the types of the covariables. As default, variables type won't be changed.
equation
Character containing the formula to be used to create the model.
num_var
Numeric with the number of variables in the matrix for which the analysis will be performed. Compulsory if equation is not null.
labels
Character vector with the labels of the variables.
sva
Logical indicating if Surrogate Variable Analysis should be applied.
region_methods
Character vector with the methods used in DARegion. If "none", region analysis is not performed.
shrinkVar
Logical indicating if shrinkage of variance should be applied in probe analysis.
probe_method
Character with the type of linear regression applied in probe analysis ("ls" or "robust")
max_iterations
Numeric with the maximum of iterations in the robust regression.
num_feat
Numeric with the minimum number of cpg beta values to be included in the results.
num_cores
Numeric with the number of cores to be used.
verbose
Logical value. If TRUE, it writes out some messages indicating progress. If FALSE nothing should be printed.
...
Further arguments passsed to DARegion function.

Value

MethylationResult object

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.

See Also

preparePhenotype

Examples

Run this code
if (require(minfiData)){
 set <- prepareMethylationSet(matrix = getBeta(MsetEx)[1:10, ], pheno = pData(MsetEx))
 res <- DAPipeline(set, variable_names = "Sample_Group", probe_method = "ls") 
 res
}

Run the code above in your browser using DataLab