qc.rlsc | R Documentation |
QC based robust LOESS (locally estimated scatterplot smoothing) signal correction (QC-RLSC)
qc.rlsc(x, y, method = c("subtract", "divide"), opti = TRUE, ...)
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'. |
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.
A corrected data frame.
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)
Other QC-RLSC function:
qc.rlsc.wrap()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.