Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/NetCDFPeakFinding.R
This function reads a netcdf chromatogram file, finds the apex intensities and returns a list containing the retention time and the intensity matrices.
1 2 | NetCDFPeakFinding(ncdf, massRange = NULL, Window = 15, IntThreshold = 10,
pp.method = "ppc", baseline = FALSE, ...)
|
ncdf |
A character string naming a netcdf file or a list generated by the function
|
massRange |
Deprecated. It is completely ignored but it is kept for compatibility with old scripts. |
Window |
The window used by peak picking method. The number of points actually used
is |
IntThreshold |
Apex intensities lower than this value will be removed from the RI files. |
pp.method |
The pick picking method to be used. Options are |
baseline |
Logical. Should baseline correction be performed? |
... |
Extra options passed to |
The parameter ncdf
should be either a path to a NetCDF file or a list
generated by the function peakCDFextraction
. This list contains elements
named "Time", "Peaks", "massRange", "Index", and "baselineCorrected". Refer to
the function's man page for details.
Formerly, the massRange
parameter was a numeric vector with two components: lower
and higher masses. Now, the mass range is detected automatically and it has no effect if
it is set. It is kept only for compatibility reasons.
There are three peak picking algorithms that can be used. The "smoothing"
method
smooths the m/z curves by a moving average and then looks for a change of sign of the
intensity difference between two consecutive points. The "gaussian"
is exactly
the same, but it uses a gaussian smoother instead of a moving average.
The "ppc"
uses a sliding window and looks for the local maxima. This method is
based on the R-package ppc
(now unavailable).
A three component list.
Time |
The retention time vector. |
Peaks |
The intensity matrix. Rows are the retention times and columns are masses. The first column is the lower mass value and the last one is the higher mass. |
massRange |
The mass range. |
Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig
1 2 3 4 5 6 7 8 9 10 11 | require(TargetSearchData)
CDFpath <- file.path(find.package("TargetSearchData"), "gc-ms-data")
CDFfiles <- dir(CDFpath, pattern = ".cdf$", full.names = TRUE)
CDFfiles
# extrac peaks of first chromatogram
peaks.1 <- NetCDFPeakFinding(CDFfiles[1], Window = 15, IntThreshold = 10, pp.method = "ppc")
# scan acquisition times
head(peaks.1$Time)
# peaks in matrix form. first column is mass 85, last one is mass 320.
head(peaks.1$Peaks)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.