dmrff: dmrff

View source: R/dmrff.r

dmrffR Documentation

dmrff

Description

Identifying differentially methylated regions efficiently with power and control.

Usage

dmrff(
  estimate,
  se,
  p.value,
  methylation,
  chr,
  pos,
  maxgap = 500,
  p.cutoff = 0.05,
  minmem = T,
  verbose = T
)

Arguments

estimate

Vector of association effect estimates (corresponds to rows of methylation).

se

Vector of standard errors of the effect estimates.

p.value

Vector of p-values.

methylation

Methylation matrix (rows=features, columns=samples).

chr

Feature chromosome (corresponds to rows of methylation).

pos

Feature chromosome position.

maxgap

Maximum distance between consecutive features (Default: 500bp).

p.cutoff

Unadjusted p-value cutoff for membership in a candidate DMR (Default: 0.05).

verbose

If TRUE (default), then output status messages.

Details

Warning! Ensure that the order of the CpG sites corresponding to the the rows of 'methylation' match the order of the CpG sites corresponding to the other variables, e.g. 'estimate' and 'chr'.

Value

A data frame listing all candidate regions and their summary statistics.

Examples


dmrs <- dmrff(estimate, ## effect estimate for each CpG site
              se,       ## standard error of the estimate for each CpG site
              p.value,  ## p-value
              methylation, ## methylation matrix
              chr,      ## chromosome of each CpG site
              pos)      ## position of each CpG site
                     
dmrs[which(dmrs$p.adjust < 0.05 & dmrs$n > 1),]


perishky/dmrff documentation built on July 19, 2024, 5:16 a.m.