calculateJaggedness: Calculate Jaggedness (of a Chromatographic Peak)

Description Usage Arguments Details Value Examples

View source: R/calculateJaggedness.R

Description

Calculates the Jaggedness of the integrated region of a chromatographic peak. The Jaggedness is found by determining the fraction of time points the intensity of the peak changes direction - excluding the peak apex and any intensity changes below a flatness factor.

Usage

1
calculateJaggedness(peakData, pts, flatness.factor = 0.05)

Arguments

peakData

A vector containing characteristic information about a chromatographic peak - including the retention time range

pts

A 2D matrix containing the retention time and intensity values of a chromatographic peak

flatness.factor

A numeric value between 0 and 1 that allows the user to adjust the sensitivity of the function to noise. This function calculates the difference between each adjacent pair of points; any value found to be less than flatness.factor * maximum intensity is set to 0.

Details

This function repurposed from TargetedMSQC. Toghi Eshghi, S., Auger, P., & Mathews, W. R. (2018). Quality assessment and interference detection in targeted mass spectrometry data using machine learning. Clinical Proteomics, 15. https://doi.org/10.1186/s12014-018-9209-x

Value

The jaggedness of a chromatographic peak (double)

Examples

1
2
3
4
# Calculate Jaggedness for a peak
data(ex_pts)
data(ex_peakData)
jaggedness <- calculateJaggedness(peakData = ex_peakData, pts = ex_pts)

KelseyChetnik/MetaClean documentation built on May 17, 2021, 5:33 a.m.