QCRSC {pmp} | R Documentation

## Quality Control-Robust Spline Correction (QC-RSC)

### Description

Implementation of Quality QC-RSC algorithm for signal drift and batch effect correction within/across a multi-batch direct infusion mass spectrometry (DIMS) and liquid chromatography mass spectrometry (LCMS) datasets. This version supports missing values, but requires at least 4 data point for quality control (QC) samples measured within each analytical batch. The smoothing parameter (spar) can be optimised using leave-one-out cross validation to avoid overfitting.

### Usage

    QCRSC(
      df,
      order,
      batch,
      classes,
      spar = 0,
      log = TRUE,
      minQC = 5,
      qc_label = "QC",
      spar_lim = c(-1.5, 1.5)
    )

### Arguments

`df` | A matrix-like (e.g. an ordinary matrix, a data frame) or RangedSummarizedExperiment-class object with all values of class `numeric()` or `integer()` of peak intensities, areas or other quantitative characteristic.
`order` | `numeric()`, A numeric vector indicating the order in which samples were measured.
`batch` | `numeric()` or `character()`, a vector indicating the batch each sample was measured in. If only one batch was measured then all values should be set to 1
`classes` | `character()`, vector of class labels. Must be the same length as the number of sample in the input peak table. If input is `SummarizedExperiment` object, use `SummarizedExperiment_object$meta_data_column_name`.
`spar` | `numeric(1)`, 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` | `logical(1)`, to perform the signal correction fit on the log scaled data. Default is TRUE.
`minQC` | `integer(1)`, Minimum number of measured quality control (QC) samples required for signal correction within feature per batch. For features where signal was measured in less QC samples than threshold signal correction won't be applied.
`qc_label` | `character(1)` or `NULL`, class label used to identify QC samples.
`spar_lim` | A 2 element numeric vector containing the min and max values of spar when searching for an optimum. Default `spar_lim = c(-1.5,1.5)`

### Value

Object of class `SummarizedExperiment`. If input data are a matrix-like (e.g. an ordinary matrix, a data frame) object, function returns the same R data structure as input with all value of data type `numeric()`.

### 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

    classes <- MTBLS79$Class
    batch <- MTBLS79$Batch
    order <- c(1:ncol(MTBLS79))

    out <- QCRSC(df = MTBLS79[1:10, ], order = order, batch = MTBLS79$Batch,
    classes = MTBLS79$Class, spar = 0, minQC = 4)

[Package pmp version 1.4.0 Index]