Description Usage Arguments Value Examples
View source: R/extract_feature_intensity.R
For each of the given features local maxima will be identified in a region
of 2ppm around the theoretical mz value using the algorithm implemented in
the function locate.peaks
. The intensity value at the
local maximum with maximal intenstity within 1ppm will be extracted.
If no peak could be detected, the intensity at the closest measured mz value
is used.
1 2 3 4 5 6 7 8 9 10 | extract_feature_intensity(
spectrum.file,
scanrange = c(1, 1),
info.features,
ppm = 10,
num.pts = 5,
oneside.min = 1,
verbose = TRUE,
res.dir = NULL
)
|
spectrum.file |
Character. Name of mzML file to read. |
scanrange |
Numeric vector of length 2. Scan range to read
(see |
info.features |
data.frame with information about features (e.g. as
generated by the function |
ppm |
Numeric. Resolution of mass spectrometer. |
num.pts |
Numeric. Minimum number of points needed to search for a peak
(see |
oneside.min |
Numeric. Minimum number of points needed on each side of
the local maximum (see |
verbose |
Logical. Print out additional information. |
res.dir |
Character. Name of directory where result is saved as RDS object (using the basename of the spectrum file). If NULL, a data.frame with the results will be returned. |
if res.dir = NULL, data frame with information for each feature:
id: feature identifier (corresponds to chemical.form.isotope in info.features)
mz.th: theoretical mz value
intensity: extracted intensity
mz.meas: mz value at center of peak (or closest measured mz value)
peak.detected: 0 = no peak detected, 1 = peak detected, NA = no or not enough mz values available for feature
1 2 3 4 5 6 7 8 9 10 11 | data("info.features")
res.dir = tempdir()
mzml.file = system.file("extdata",
"20121015b__002__07__ME.mzML",
package = "preprocessHighResMS")
extract_feature_intensity(spectrum.file = mzml.file,
scanrange = c(1, 2),
info.features = info.features,
ppm = 20,
res.dir = res.dir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.