DML: Test differential methylation on each locus

Description Usage Arguments Value Examples

View source: R/differential_methylation.R

Description

The function takes a beta value matrix with probes on the rows and samples on the columns. It also takes a sample information data frame (sample.data) and formula for testing. The function outputs a list of coefficient tables for each factor tested.

Usage

1
2
3
4
5
6
7
8
DML(
  betas,
  sample.data,
  formula,
  se.lb = 0.06,
  balanced = FALSE,
  cf.test = NULL
)

Arguments

betas

beta values

sample.data

data frame for sample information, column names are predictor variables (e.g., sex, age, treatment, tumor/normal etc) and are referenced in formula. Rows are samples.

formula

formula

se.lb

lower bound to standard error of slope, lower this to get more difference of small effect size.

balanced

whether design is balanced or not. default to FALSE, when unbalanced will use Welch's method to estimate standard error. balance=TRUE is faster.

cf.test

factors to test (default to all factors in formula except intercept). Use "all" for all factors.

Value

cf - a list of coefficient tables for each factor

Examples

1
2
data <- sesameDataGet('HM450.76.TCGA.matched')
cf <- DML(data$betas, data$sampleInfo, ~type)

sesame documentation built on Nov. 15, 2020, 2:08 a.m.