QCRSC: Quality Control-Robust Spline Correction (QC-RSC)

Description Usage Arguments Details Value Author(s) References Examples

View source: R/sbc_main.R

Description

Implementation of signal correction algorithm as described in Kirwan et al, Anal. Bioanal. Chem., 405 (15), 2013

Usage

1
2
QCRSC(df, order, batch, classes, spar = 0, log = TRUE, minQC = 5,
  qc_label = "QC")

Arguments

df

A data frame of values to be corrected (samples in columns and features in rows).

order

A numeric vector indicating the order in which samples were measured.

batch

A vector indicating the batch each sample was measured in. If only one batch then all values should be set to 1.

classes

A factor or character vector of sample classes. All QC samples should be labelled 'QC'.

spar

Spline smoothing parameter. Should be in the range 0 to 1. If set to 0 it will be estimated using leave-one-out cross-validation.

log

TRUE or FALSE to perform the signal correction fit on the log scaled data. Default is TRUE.

minQC

Minimum number of QC samples required for signal correction.

qc_label

Class label for QC sample.

Details

The smoothing parameter (spar) can be optimised using leave-one-out cross validation to avoid overfitting.

Value

A data frame of corrected values.

Author(s)

Andris Jankevics a.jankevics@bham.ac.uk

References

Kirwan et al, Anal. Bioanal. Chem., 405 (15), 2013 https://dx.doi.org/10.1007/s00216-013-6856-7

Examples

1
2
3
4
5
6
classes <- sbcdata$class
batch <- sbcdata$batch
order <- c(1:nrow(sbcdata$data))
data <- t(sbcdata$data[, 1:20])
out <- QCRSC(df = data, order = order, batch = batch, classes = classes,
spar = 0, minQC = 4)

computational-metabolomics/sbcms documentation built on June 17, 2021, 12:22 a.m.