Learn R Programming

MEAL (version 1.2.3)

correlationMethExprs: Computes the correlation between methylation and expression

Description

Estimates the correlation between methylation and expression. When there are known variables that affect methylation and/or expression, their effect can be substracted using a linear model and then the residuals are used.

Usage

correlationMethExprs(multiset, vars_meth = NULL, vars_exprs = NULL, vars_meth_types = rep(NA, length(vars_meth)), vars_exprs_types = rep(NA, length(vars_exprs)), meth_set_name = "methylation", exprs_set_name = "expression", sel_cpgs, flank = 250000, num_cores = 1, verbose = TRUE)

Arguments

multiset
MultiDataSet containing a methylation and an expression slots.
vars_meth
Character vector with the names of the variables that will be used to obtain the methylation residuals. By default, none is used and residuals are not computed.
vars_exprs
Character vector with the names of the variables that will be used to obtain the expression residuals. By default, none is used and residuals are not computed.
vars_meth_types
Character vector with the types of the methylation variables. By default, variables type won't be changed.
vars_exprs_types
Character vector with the types of the expression variables. By default, variables type won't be changed.
meth_set_name
Character vector with the name of the MultiDataSet's slot containing methylation data.
exprs_set_name
Character vector with the name of the MultiDataSet's slot containing expression data.
sel_cpgs
Character vector with the name of the CpGs used in the analysis. If empty, all the CpGs of the methylation set will be used.
flank
Numeric with the number of pair bases used to define the cpg-expression probe pairs.
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.

Value

Data.frame with the results of the linear regression:
  • cpg: Name of the cpg
  • exprs: Name of the expression probe
  • beta: coefficient of the methylation change
  • se: standard error of the beta
  • P.Value: p-value of the beta coefficient
  • adj.P.Val: q-value computed using B&H

Details

For each cpg, a range is defined by the position of the cpg plus the flank parameter (upstream and downstream). Only those expression probes that are entirely in this range will be selected. For these reason, it is required that the ExpressionSet contains a featureData with the chromosome and the starting and ending positions of the probes.