DMPextr: Extract DMPs, annotation and methylation difference for each...

View source: R/DMPextr.R

DMPextrR Documentation

Extract DMPs, annotation and methylation difference for each contrast

Description

For each contrast extract a set of DMPs and add gene annotation and methylation values

Usage

DMPextr(
  fit,
  ContrastsDM,
  p.value,
  beta_normalized,
  mDiff,
  ann,
  writeOut = TRUE
)

Arguments

fit

list containing a linear model fit produced by lmFit, lm.series, gls.series or mrlm. For topTable, fit should be an object of class MArrayLM as produced by lmFit and eBayes.

ContrastsDM

list of contrasts as returned by limma::makeContrasts() which will pass to limma topTable as input

p.value

cutoff value for adjusted p-values. Only genes with lower p-values are listed.

beta_normalized

normalized betavalues, as produce by minfi::getBeta(grSet_noob)), where colnames(beta_normalized) == metadata$sample_Name

mDiff

absolute mean methylation difference between groups to filter by

ann

annotation dataset from manifest with metadata such as gene info, CGI, RefGene, etc. see topTable genelist arg.

write.out

save result as .csv default = TRUE.

Value

data.table

Author(s)

Izar de Villasante

Angelika Merkel

Examples


betas<-readRDS("data/betas.rds")
fit<-readRDS("data/fit2.rds")
ann<-readRDS("data/ann.rds")
DMPann <- DMPextr(fit = fit,                       # linear contrast model
                  ContrastsDM = ContrastsDM,          # contrasts
                  p.value = 0.01,                      # filter significantly different probes
                  beta_normalized = beta_noob,        # extract mean group betas
                  mDiff = 0.5,                        # select mean methylation differences
                  ann = ann,                          # annotate positions (CGI, RefGene, etc)
                  writeOut = FALSE                    # write output to file

ijcBIT/cnv.methyl documentation built on Jan. 10, 2023, 7:51 a.m.