MoskalevCorrection: Moskalev correction of case/controls samples

Description Usage Arguments Value References Examples

View source: R/MoskalevCorrection.R

Description

Correction of case/controls samples by using Moskalev's cubic polynomial regression.

Usage

1
2
3
MoskalevCorrection(data, Target = NULL, n_Control = 0, n_Case = 0,
  level_Control = 0.9986501, opt_BoxPlot = 0, dir = NULL,
  printing = TRUE, plotting = TRUE, cex_par = 1.25)

Arguments

data

Formatted input data frame obtained from the function Formatting.

Target

Name of the target DMR/CpG island/gene to be visualised.

n_Control

Number of controls samples.

n_Case

Number of case samples.

level_Control

Level of significance of the differential methylation test between case and control corrected samples. Default value is level_Control = 0.9986501 which correspond to z = 3 quantile for normally distributed data.

opt_BoxPlot

Boxplot option: If opt_BoxPlot = 0 (default), BoxPlot is centered on the median, whereas if opt_BoxPlot = 1 it is centered on the mean.

dir

In Unix-specific OS, user-specified directory where the plots in pdf format are saved. If the directory is not specified, figures are saved in the current working directory.

printing

If printing = TRUE (default), the corrected methylation levels of the case/control samples using Moskalev's cubic polynomial regression (Moskalev et al., 2011) are printed on the screen.

plotting

If plotting = TRUE (default), the corrected methylation levels for the control samples as well as its (1-level_Control)% confidence interval are depicted. BoxPlot of the corrected methylation levels are also shown for each control sample. If cases are included, a second figure presents a BoxPlot for each case sample as well as the controls' (1-level_Control)% confidence interval and the hyper- and hypo-methylated cases (top red triangles).

cex_par

Number indicating the amount by which plotting text and symbols should be scaled relative to the default (cex_par = 1).

Value

This function returns the corrected methylation level for the control and (if selected) case samples using Moskalev's cubic polynomial regression. Based a parametric t-test at (1-level_Control)%, hyper- and hypo-methylated cases are also flagged.

In Unix-specific OS, figures are saved in the current directory, unless otherwise specified by the user, in pdf format. In Windows OS, figures are printed on the screen.

References

Ochoa E, Zuber V, Fernandez-Jimenez N, Bilbao JR, Clark GR, Maher ER and Bottolo L. MethylCal: Bayesian calibration of methylation levels. Submitted. 2019.

Moskalev EA, Zavgorodnij MG, Majorova SP, Vorobjev IA, Jandaghi P, Bure IV, Hoheisel JD. Correction of PCR-bias in quantitative DNA methylation studies by means of cubic polynomial regression. Nucleic Acids Res. 2011; 39(11):e77. (PubMed)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(BWS_data)
AMP = c(0, 25, 50, 75, 100)
data = Formatting(BWS_data, AMP = AMP, n_Control = 15)
corr_data = MoskalevCorrection(data, Target = "KCNQ1OT1", n_Control = 15)

data(Celiac_data)
AMP = c(0, 12.5, 25, 37.5, 50, 62.5, 87.5, 100)
data = Formatting(Celiac_data, AMP = AMP, n_Control = 13, n_Case = (2 * 17))
corr_data = MoskalevCorrection(data, Target = "NFKBIA", n_Control = 13, n_Case = (2 * 17), 
opt_BoxPlot = 1)

lb664/MethylCal documentation built on May 23, 2019, 4:02 a.m.