TableFormatting: Exporting results utility function

Description Usage Arguments Value References Examples

View source: R/TableFormatting.R

Description

Reformatting calibration output.

Usage

1
2
TableFormatting(data, n_Control = 0, n_Case = 0, dir = NULL,
  writing = TRUE)

Arguments

data

Input data frame obtained either using MethylCal's Bayesian calibration method (Ochoa et al., 2019) or Moskalev's cubic polynomial calibration (Moskalev et al., 2011).

n_Control

Number of controls samples.

n_Case

Number of case samples.

dir

User-specified directory where the calibrated methylation level are saved. If the directory is not specified, table is saved in the current working directory.

writing

If writing = TRUE (default), the file of the corrected methylation levels of the case/control samples are saved in dir.

Value

Short formatted output data frame. It includes the name of the DRM/CpG island/gene ("Target"), chromosome ("Chrom"), CpG position ("CpG_group"), uncalibrated methylation levels as well as the corresponding levels based either on MethylCal's Bayesian calibration method or Moskalev's cubic polynomial calibration.

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
11
data(BWS_data)
AMP = c(0, 25, 50, 75, 100)
data = Formatting(BWS_data, AMP = AMP, n_Control = 15, n_Case = 18)
corr_data = MoskalevCorrection(data, Target = "KCNQ1OT1", n_Control = 15, n_Case = 18)
output_data = TableFormatting(corr_data, n_Control = 15, n_Case = 18)

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 = MethylCalCorrection(data, Target = "NFKBIA", n_Control = 13, n_Case = (2 * 17))
output_data = TableFormatting(corr_data, n_Control = 13, n_Case = (2 * 17), writing = FALSE)

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