Description Usage Arguments Value Methods Author(s) References See Also Examples
Two methods for peak detection in baseline corrected spectral data. Methods include signal-to-noise ratio and slopes of peaks.
1 2 3 4 5 6 7 8 |
dat |
The name of the spectral data frame, containing |
mass_dat |
Character string. The name of the column in |
intensity_dat |
Character string. The name of the column in |
method |
Character string. The method of peak detection. Either
|
n |
Single numeric value. For both |
SNR_thresh |
Single numeric value. When |
Returns a new data frame containing only the peaks which have passed the detection criteria.
Each spectrum is divided into
segments of size n
. Noise is calculated as the median absolute
deviation of points within each segment [1]. If the intensity of a peak
divided by the noise in that segment is less than the indicated
SNR_thresh
, the peak is discarded.
Uses the shapes
of peaks to remove false peak candidates [1]. First, the left and right
endpoints of each peak are identified on the baseline. Next, the slopes of
each endpoint are evaluated. If the either the left or right slope are less
than a defined threshold, the peak candidate is discarded [1]. The
threshold is defined as half of the local noise level, or half of the
median absolute deviation in a window of size n
.
Kristen Yeh <kristenyeh@trentu.ca> Wesley Burr <wesleyburr@trentu.ca>
https://github.com/wesleyburr/subMaldi (1) Yang, C., He, Z. & Yu, W. Comparison of public peak detection algorithms for MALDI mass spectrometry data analysis. BMC Bioinformatics 10, 4 (2009). https://doi.org/10.1186/1471-2105-10-4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Load sample dataset "bsline"
data("bsline")
## Baseline correct using method "linear"
linear <- baselineCorr(bsline, "mass", "raw",
method = "linear", n = 7)
## Detect peaks using method "snr"
snr <- peakDet(linear, "mz", "baseline", method = "snr",
n = 7, SNR_thresh = 3)
## Detect peaks using method "slopes"
slopes <- peakDet(linear, "mz", "baseline", method = "slopes",
n = 7)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.