qc.rlsc {qcrlscR} | R Documentation |
QC based robust LOESS signal correction (QC-RLSC)
Description
QC based robust LOESS (locally estimated scatterplot smoothing) signal correction (QC-RLSC)
Usage
qc.rlsc(x, y, method = c("subtract", "divide"), opti = TRUE, ...)
Arguments
x |
A data frame with samples (row) and variables (column). |
y |
A vector with string of "qc" and "sample". |
method |
Data scaling method. |
opti |
A logical value indicating whether or not optimise 'span' |
... |
Other parameter for 'loess'. |
Details
This function includes only information of sample types (QC
or
Sample
) for signal correction. It does not require batch information.
User may use batch elimination routine such as batch.shift()
in this
package or others to remove batch effects after signal correction.
If data matrix has missing values, user should filter the data based on missing values percentage. No missing values imputation is needed.
An option is also provided to optimise LOESS's span
in a range
between 0.05 to 0.95. The R codes are modified from
https://bit.ly/3zBo3Qn.
Value
A corrected data frame.
References
Dunn et al. Procedures for large-scale metabolic profiling of serum and plasma using gas chromatography and liquid chromatography coupled to mass spectrometry. Nature Protocols 6, 1060–1083 (2011)
See Also
Other QC-RLSC function:
qc.rlsc.wrap()
Examples
names(man_qc)
data <- man_qc$data
meta <- man_qc$meta
cls.qc <- factor(meta$sample_type)
cls.bl <- factor(meta$batch)
## apply QC-RLSC with optimisation of 'span'
res_1 <- qc.rlsc(data, cls.qc, method = "subtract", opti = TRUE)
## apply QC-RLSC without optimisation of 'span'
res_2 <- qc.rlsc(data, cls.qc, method = "subtract", opti = FALSE)