Skip to contents

Corrects retention time differences using parametric time warping as implemented in ptw.

Usage

correct_peaks(peak_list, mod_list, chrom_list, match_names = TRUE)

Arguments

peak_list

A `peak_list` object created by get_peaks, containing a nested list of peak tables where the first level is the sample, and the second level is the spectral wavelength. Every component is described by a matrix where every row is one peak, and the columns contain information on retention time, peak width (FWHM), peak width, height, and area.

mod_list

A list of ptw models.

chrom_list

List of chromatograms supplied to create ptw models.

match_names

Logical. Whether to actively match the names of the peak_list to the list of models (mod_list). Defaults to TRUE.

Value

The input list of peak tables is returned with extra columns containing the corrected retention time.

Details

Once an appropriate warping model has been established, corrected retention times can be predicted for each peak. These are stored in a separate column in the list of peak tables.

Note

This function is adapted from getPeakTable function in the alsace package by Ron Wehrens.

See also

Author

Ron Wehrens, Ethan Bass