The steps the algorithm takes are the following:
log2 transform the intensities
Choose 2 samples to generate an MA-plot from
Fit a LOESS curve
Subtract half of the difference between the predicted value and the true value from the intensity of sample 1 and add the same amount to the intensity of Sample 2
Repeat for all unique combinations of samples
Repeat all steps until the model converges or n_iter is reached.
Convergence is assumed if the confidence intervals of all LOESS smooths include the 0 line. If fixed_iter = TRUE, the algorithm will perform exactly n_iter iterations.
If fixed_iter = FALSE, the algorithm will perform a maximum of n_iter iterations.
See the reference section for details.
normalize_cyclic_loess(
data,
n_iter = 3,
fixed_iter = TRUE,
loess_span = 0.7,
level = 0.95,
verbose = FALSE,
...
)A tibble with intensities normalized across samples.
A tidy tibble created by read_featuretable.
The number of iterations to perform. If fixed_iter = TRUE exactly n_iter will be performed. If fixed_iter = FALSE a maximum of n_iter will be performed and the algorithm will stop whether convergence is reached or not.
Should a fixed number of iterations be performed?
The span of the LOESS fit. A larger span produces a smoother line.
The confidence level for the convergence criterion. Note that a a larger confidence level produces larger confidence intervals and therefore the algorithm stops earlier.
TRUE or FALSE. Should messages be printed to the console?
Arguments passed onto loess. For example, degree = 1, family = "symmetric", iterations = 4, surface = "direct" produces a LOWESS fit.
B. M. Bolstad, R. A. Irizarry, M. Åstrand, T. P. Speed, Bioinformatics 2003, 19, 185–193, DOI 10.1093/bioinformatics/19.2.185.
Karla Ballman, Diane Grill, Ann Oberg, Terry Therneau, “Faster cyclic loess: normalizing DNA arrays via linear models” can be found under https://www.mayo.edu/research/documents/biostat-68pdf/doc-10027897, 2004.
K. V. Ballman, D. E. Grill, A. L. Oberg, T. M. Therneau, Bioinformatics 2004, 20, 2778–2786, DOI 10.1093/bioinformatics/bth327.
toy_metaboscape %>%
impute_lod() %>%
normalize_cyclic_loess()
Run the code above in your browser using DataLab