limma.tt: Generate limma top-table for differential methylation

Description Usage Arguments Details Value

View source: R/limma.tt.R

Description

Creates a custom output for testing differential methylation of M-values according to a variable within a linear model for each CpG site in a 450K array.

Usage

1
2
3
4
limma.tt(mval.mat, betas.mat, pheno, var.interest, covars = NULL, fDat)

limma.tt.paired(mval.mat, betas.mat, pheno, subj.fld, var.interest,
  covars.diff = NULL, covars.fixed = NULL, fDat)

Arguments

mval.mat

Matrix of M-values with CpG sites in rows and samples in columns

betas.mat

Matrix of β-values corresponding to mval.mat

pheno

Data frame of phenotypes describing samples in same order as columns of mval.mat and betas.mat

var.interest

Character value for one column name in pheno. For limma.tt, this is simply the variable in the linear model on which limma will conduct inference. For limma.tt.paired, this variable must be a two-level factor for which each subject has two samples in the array, one for each factor level.

covars

Character vector of covariates to include in the linear model. These should all be names of columns in pheno.

fDat

Data.frame of CpG site annotations. Must contain columns named "GeneSymbol" and "cpgSite".

subj.fld

Character value for the ID of subjects in the experiment. Must correspond to a column name of pheno. For limma.tt.paired, each different subject must have exactly two samples in the array, one for each level of var.interest.

covars.diff

Character vector of covariates which vary according to the levels of var.interest in the paired analysis. The differences of these covariates will be added to the linear model. Must correspond to columns of pheno.

covars.fixed

Character vector of covariates which do not vary according to the levels of var.interest. These will be added as is to the linear model in the paired analysis. Must correspond to columns of pheno.

Details

limma.tt() Runs limma on M-values based on a linear model including a variable of interest (for inference) and covariates. limma.tt.paired() Is a custom function which takes in an array of M-values of paired samples. In this analysis, the variable of interest is a two-level factor and differences in M-values are calculated per subject according to this factor. Covariates are included in the linear model as either differences according to the variable of interest or fixed covariates. The inference is then done on the intercept in the linear model to test for differences according to the variable of interest per subject, adjusting for appropriate covariates.

Value

A data.frame giving the standard output from a limma analysis for the M-values, as well as a column denoting effect sizes for corresponding β-values, called betaFC, and a column of corresponding genes for the CpG sites.


nickfishbane/DMRtools documentation built on May 23, 2019, 4:47 p.m.