Description Usage Arguments Value See Also Examples
Provides a common interface for packing detected mass spectrometry peaks into an appropriate output object.
1 2 | msPeakInfo(x, y, index.min, index.max, noise.local = NULL,
snr.thresh = 2)
|
x |
A numeric vector representing the |
y |
A numeric vector representing the intensity values of the spectrum. |
index.max |
A logical vector the size of the original mass spectrum. If the
kth element is |
index.min |
A logical vector the size of the original mass spectrum. If the
kth element is |
noise.local |
A numeric vector representing the estimated instantaneous noise level,
i.e., one noise element for each m/z value. This argument is used to form signal-to-noise
ratio (SNR) estimates that are subsequently compared to the |
snr.thresh |
A numeric value representing the signal intensity threshold.
Only the local maxima whose signal intensity is above this value
will be recorded as peaks. Default: |
A data.frame with 10 columns: peak class location, left bound, right bound and
peak span in both clock tick
("tick.loc"
, "tick.left"
, "tick.right"
, "tick.span"
)
and mass measure
("mass.loc"
, "mass.left"
, "mass.right"
, "mass.span"
),
and peak signal-to-noise ratio and intensity
("snr"
, "intensity"
).
Since noise.local
is NULL
, "snr"
is the same as ("intensity"
).
msPeak
, msPeakSimple
, msPeakMRD
, msPeakCWT
.
1 2 3 4 5 6 7 8 9 10 11 12 | if (!exists("qcset")) data("qcset", package="msProcess")
## create faux MS peak data
z <- qcset[seq(500), 1]
x <- z$mz
y <- z$intensity
noise <- as.vector(wavCWT(y, n.scale=1))
index.min <- peaks(-y, span=31)
index.max <- peaks(y, span=31)
## pack data using the constructor
msPeakInfo(x, y, index.min, index.max, noise.local=noise, snr.thresh=1.3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.