lmc.lola.enrichment: lmc.lola.enrichment

View source: R/LMC_interpretation.R

lmc.lola.enrichmentR Documentation

lmc.lola.enrichment

Description

This routine computes LOLA enrichment results for LMC-specifically hypo- or hypermethylated sites.

Usage

lmc.lola.enrichment(medecom.result, annotation.filter = NULL, anno.data,
  K = NULL, lambda = NULL, cg_subset = NULL, diff.threshold = 0.5,
  reference.computation = "median", comp.lmcs = NULL,
  region.type = "ensembleRegBuildBPall", temp.dir = tempdir(),
  type = "hypo", assembly = "hg19", lola.db = NULL)

Arguments

medecom.result

An object of type MeDeComSet-class or the location of an .RData file, where such an object is stored.

annotation.filter

A numeric vector specifying the sites that have been removed from rnb.set in a preprocessing step (e.g. coverage filtering) or a path to an .RData file.

anno.data

The original RnBSet-class object containing methylation, sample meta and annotation information, a path to a directory stored by save.rnb.set or a data.frame containing CpG annotations (ann_C)

K

The number of LMCs specified for the MeDeCom run.

lambda

The lambda parameter selected.

cg_subset

The index of the selection strategy employed (e.g. most variable CpGs).

diff.threshold

The difference cutoff between median methylation in the remaining LMCs and the LMC of interest used to call a CpG differentially methylated. The higher this value, the more conservative the selection.

reference.computation

Metric used to set the reference on the remaining LMCs to determine hyper- and hypomethylated sites. Can be either "median" (default), "mean", or "lmcs" (comp.lmcs argument needs to be provided).

comp.lmcs

Numeric vector containing two numbers representing the LMCs that should be compared to one another.

region.type

Region type used to annotate CpGs to potentially regulatory regions (see https://rnbeads.org/regions.html) for a list of available region types.

temp.dir

Path to a directory used to store temporary files.

type

Which direction is to be tested for enrichment. Can be one of "hypo", "hyper", or "differential"

assembly

The assembly used. Needs to be one of "hg19", "hg38" or "mm10". Does not need to be specified, if rnb.set is a RnBSet-class

lola.db

A loaded LOLA database as loaded with LOLA::loadRegionDB. If this value is NULL, the database is loaded automatically and stored in the temporary directory.

Details

This function employs LOLA on the CpG sites that are LMC-specifically hypomethylated, after annotating the sites to the closest region defined by region.type. The sites are selected by computing the median methylation value of the other LMCs and then selecting those sites that are more than diff.threshold away from the median in the LMC of interest. This is done for all LMCs from 1 to K.

Value

A list with K elements. One element is the enrichment result of the corresponding LMC-specific hypomethylated CpG sites.

Author(s)

Michael Scherer

See Also

lmc.lola.plot.tables


lutsik/MeDeCom documentation built on Feb. 15, 2023, 11:32 a.m.