compute_CV: CVlogT

View source: R/compute_CV.R

compute_CVR Documentation

CVlogT

Description

Computes coefficient of variation of the log of the total intensity signal

Usage

compute_CV(M_SD, U_SD, M, U, alpha = 100)

Arguments

M_SD

Methylated standard deviation intensity matrix (CpGs as rows, samples as columns)

U_SD

Unmethylated fluorescence standard deviation intensity matrix (CpGs as rows, samples as columns)

M

Methylated fluorescence mean intensity matrix (CpGs as rows, samples as columns)

U

Unmethylated fluorescence mean intensity matrix (CpGs as rows, samples as columns)

Details

It computes the following:

R = \frac{M_{SD} + U_{SD} + \alpha}{U + M + \alpha}

CV_{logT}= \frac{1}{\frac{\log(U + M + \alpha)}{R} - R/2}

For more details, check the reference paper.

Value

A matrix CV (CpGs as rows, samples as columns)

References

Revisiting Genetic artefacts on DNA methylation microarrays. Genome Research

Examples

rgSet = read.metharray.exp(getwd(), extended = TRUE)
Grn = assay(rgSet, "Green")       # Green mean across beads
Red = assay(rgSet, "Red")         # Red mean across beads
M_U = GR_to_UM(Red, Grn, rgSet, "Mean")
GrnSD = assay(rgSet, "GreenSD")   # Green SD across beads
RedSD = assay(rgSet, "RedSD")     # Red SD across beads
M_U_sd = GR_to_UM(RedSD, GrnSD, rgSet, "SD")
compute_CV(M_U_sd$M, M_U_sd$U, M_U$M, M_U_sd$U)

BenjaminPlanterose/UMtools documentation built on Aug. 19, 2024, 4:54 a.m.