View source: R/compute_BC_CV.R
compute_BC_CV | R Documentation |
Computes bimodality coefficient of the CVlogT per CpG across samples
compute_BC_CV(CV, parallel = F, nThread = NULL)
CV |
A coefficient of variation matrix (probes as rows, samples as columns) |
parallel |
Whether to perform this task employing parallel processing. |
nThread |
Number of CPU cores to employ on this task |
It computes the following per row (per CpG):
BC = \frac{\gamma^{2} +1}{\kappa + \frac{3\cdot(n-1)^{2}}{(n-2)\cdot(n-3)}}
Where \gamma
is the sample skewness and where \kappa
is the sample excess kurtosis.
For more details, check the reference paper.
A vector of coefficients of bimodality per CpG
Revisiting Genetic artefacts on DNA methylation microarrays. Genome Research
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")
CV = compute_CV(M_U_sd$M, M_U_sd$U, M_U$M, M_U_sd$U)
compute_BC_CV(CV)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.