ApplyQCModel: Apply a binary predictive peak QC model to flag peaks that...

Description Usage Arguments Value Examples

Description

The function takes the feature dataframe (output of ExtractFeatures output$features) and the trained predictive QC model (output of TrainQCModel) and applies the model to the input feature data using the function provided in the caret package.

Usage

1
2
3
ApplyQCModel(data.feature, model, response.var = c("Status"),
  description.columns = c("Notes"), flag.prob.threshold = 0.5,
  standard.intensity.threshold = NULL, type = NULL, ...)

Arguments

data.feature

A dataframe that contains peak identifiers (File,FileName,PeptideModifiedSequence,FragmentIon,IsotopeLabelType,PrecursorCharge and ProductCharge) as well as QC metrics calcualted for each transition pair. This dataframe is the output of ExtractFeatures function (output$features).

model

The predictive model of peak QC. The model is the output of TrainQCModel.

response.var

If the input dataframe contains columns corresponding to response variables, it should be indicated here. it should be indicated here. Response and description columns as well as identifier columns will be removed from the data before applying the model.

description.columns

If the input dataframe contains columns corresponding to description variables (Such as Notes), it should be indicated here. Response and description columns as well identifier columns will be removed from the data before applying the model.

flag.prob.threshold

A numeric value between 0 and 1 which determines the cut-off threshold for assigning classes to each peak based on corresponding class probabilitis. By default, the caret package uses a probability threshold of 0.5. This parameter can be used to overrise the default probability threshold.

standard.intensity.threshold

This parameter can be used to set an intensity threshold to identify and flag transitions where the spiked-in standard is too low. If the numerical value of desired intensity threshold is provided, it is used to flag any transition whose standard signal intensity is below this threshold. For such transitions, this will override the model output.

type

If type = "prob", the function will return class probabilities for the binary classification. This feature can be used only if the model supports classification probabilities e.g. logistic regression and random forest.

Value

A dataframe of the predicted response (final class and/or class probabilities) appended to the input data.feature.

Examples

1
2
3
4
5
6
response.data <- ApplyQCModel(data.set.CSF$feature.data,
                              model.rrf.CSF,
                              response.var = c("Status"),
                              description.columns = c("Notes"),
                              flag.prob.threshold = 0.5,
                              type = "prob")

shadieshghi/TargetedMSQC documentation built on May 13, 2019, 12:20 p.m.