wrapMinfi: Finding differentially methylated CpG positions or regions

Description Usage Arguments Details Value Author(s)

View source: R/MT_wrapMinfi.R

Description

Use minfi-package to determine either differentially methylated positions (DMPs, dmpFinder) and/or differentially methylated regions (DMRs, bumphunter).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
wrapMinfi(
  GRset,
  projectfolder = "MT/minfi",
  projectname = NULL,
  phenotype,
  type.covar = "categorical",
  returnResults = c("DMP", "DMR"),
  qCutoff = 0.001,
  bumpcutoff = 0.1,
  nResamples = 1000,
  maxGap = 500
)

Arguments

GRset

GenomicRatioSet or MethylSet

projectfolder

character with directory for output files (will be generated if not exisiting).

projectname

optional character prefix for output file names.

phenotype

character with phenotype for differential methylation analysis. Must be given within the phenotype data of GRset.

type.covar

character with type of phenotype variable, either continuous or categorical.

returnResults

character indicating differentially methylated elements to return. Either "DMP" for differentially methylated positions using dmpFinder or "DMR" for differentially methylated regions using bumphunter or both.

qCutoff

numeric with q-value (FDR) threshold for DMPs to be reported by dmpFinder.

bumpcutoff

numeric start value to find the appropriate bumphunter cutoff. A cutoff 0.1 corresponds to 10 If the cutoff results in more than 10000 candidate DMRs, the cutoff is automatically increased before applying permutation testing to avoid excessive computation time.

nResamples

numeric, number of resamples to use when computing null distributions with bumphunter.

maxGap

numeric with maximum location gap used to define clusters of probes for bumphunter.

Details

The dmpFinder function from minfi identifies differentially methylated CpG-sites using linear regression for continuous phenotypes and F-test for categorical phenotypes. In case of a categorical phenotype with many groups (e.g. experimental groups), F-test is applied over all groups. Tests are performed on M values, which are logit transformed Beta values (beta = Methylated allele intensity / (Unmethylated allele intensity + Methylated allele intensity + 100)). Annotation data of GRset is added to the result table.

Instead of looking for association between a single genomic location and a phenotype of interest, bumphunter looks for genomic regions that are differentially methylated (beta values). In the context of the 450k array, the algorithm first defines clusters of probes such that two consecutive probe locations in the cluster are not separated by more than distance mapGap. Briefly, the algorithm first computes a t-statistic for beta values at each genomic location, with optional smoothing. Then, it defines a candidate region to be a cluster of probes for which all the t-statistics exceed a predefined threshold. To test for significance of the candidate regions, the algorithm uses permutations given in nResamples.

Value

list with up to 2 elements depending on selection in returnResults. Result tables are also stored as side-effects in projectfolder

Author(s)

Frank Ruehle


frankRuehle/systemsbio documentation built on Sept. 14, 2020, 1:18 a.m.