peakPantheR_applyRTCorrection: Correct targeted retention time based on reference compounds

View source: R/rtCorrection_utils.R

peakPantheR_applyRTCorrectionR Documentation

Correct targeted retention time based on reference compounds

Description

Correct targeted features retention time using the RT and RT deviation of previously fitted compounds. The 'method' and 'params' are used to select and parametrise the retention time correction method employed. When 'robust' is set to TRUE, the RANSAC algorithm is used to automatically flag outliers and robustify the correction function fitting.

Usage

peakPantheR_applyRTCorrection(
    targetFeatTable,
    referenceTable,
    method = "polynomial",
    params = list(polynomialOrder = 3),
    robust = TRUE
)

Arguments

targetFeatTable

a data.frame of compounds to target as rows and parameters as columns: cpdID (str), cpdName (str), rtMin (float in seconds), rt (float in seconds, or NA), rtMax (float in seconds), mzMin (float), mz (float or NA), mzMax (float).

referenceTable

a data.frame of reference compound information as rows and properties as columns: cpdID (str), cpdName (str), rt (float), rt_dev_sec (float)

method

(str) name of RT correction method to use (currently polynomial)

params

(list) list of parameters to pass to the each correction method. Currently allowed inputs are polynomialOrder for method='polynomial'

robust

(bool) whether to use the RANSAC algorithm to flag and ignore outliers during retention time correction

Value

a targetFeatTable with corrected RT


phenomecentre/peakPantheR documentation built on Feb. 29, 2024, 9:07 p.m.