DMR_built: Build DMR vector

Description Usage Arguments Details Value Author(s) Examples

View source: R/highmed.R

Description

To build a vector for each DMR find with DMR_search

Usage

1
DMR_built(res, methylation, nb_cpg = 2)

Arguments

res

result object of DMR_search function

methylation

chromosomal position of markers (start)

nb_cpg

chromosomal position of markers (end)

Details

We use the series of pValues (one pValue per CpGs) obtained with the EWASmultivariate regression method and the combination of pValue max2. To determine the potential DMRs used the combp method present in the ENmix package (Xu et al. 2016). This method uses the Fisher method to combine the pValues and also the base pair distance (bP) between CpGs (1000 bP maximum between nb_cpg CpGs on the same DMR). The information for each DMR is summarized by running a PCA by DMR on all of the CpGs present on each DMR. Recovering the first principal component of each PCA, we therefore have a vector corresponding to the first principal component of a PCA for each DMR.

Value

A set of build DMRs.

DMR_acp contains the first components of each PCA for each DMR. CpG_for_each_DMR contains the list of markers (CpGs) present on each DMR.

Author(s)

Basile Jumentier

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(highmed)

# Run multivariate EWAS

res <- multivariate_EWAS(X = example$X, Y = example$Y, M = example$M, K = 5)

# Keep latent factors for univariate mediation

U <- res$U

# Run max2

res <- max2(pval1 = res$pValue[, 1], pval2 = res$pValue[, 2])

# lauch DMR_search

res <- DMR_search(chr = example$annotation$chr,
                  start = example$annotation$start,
                  end = example$annotation$end,
                  pval = res$pval,
                  cpg = example$annotation$cpg, nCores = 1)

# lauch DMR_built

res <- DMR_built(res, methylation = example$M, nb_cpg = 2)

jumentib/highmed documentation built on Sept. 3, 2020, 2 p.m.