epi_beta: Identifies epimutations based on a beta distribution.

View source: R/epi_beta.R

epi_betaR Documentation

Identifies epimutations based on a beta distribution.

Description

epi_beta method models the DNA methylation data using a beta distribution. First, the beta distribution parameters of the reference population are precomputed and passed to the method. Then, we compute the probability of observing the methylation values of the case from the reference beta distribution. CpGs with p-values smaller than a threshold pvalue_threshold and with a methylation difference with the mean reference methylation higher than diff_threshold are defined as outlier CpGs. Finally, epimutations are defined as a group of contiguous outlier CpGs.

Usage

epi_beta(
  beta_params,
  beta_mean,
  betas_case,
  case,
  controls,
  betas,
  annot,
  pvalue_threshold,
  diff_threshold,
  min_cpgs = 3,
  maxGap
)

Arguments

beta_params

matrix with the parameters of the reference beta distributions for each CpG in the dataset.

beta_mean

beta values mean.

betas_case

matrix with the methylation values for a case.

case

case sample name.

controls

control samples names.

betas

a matrix containing the beta values for all samples.

annot

annotation of the CpGs.

pvalue_threshold

minimum p-value to consider a CpG an outlier.

diff_threshold

minimum methylation difference between the CpG and the mean methylation to consider a position an outlier.

min_cpgs

minimum number of CpGs to consider an epimutation.

maxGap

maximum distance between two contiguous CpGs to combine them into an epimutation.

Value

The function returns a data frame with the candidate regions to be epimutations.


isglobal-brge/EpiMutations documentation built on April 20, 2024, 9:05 a.m.