FilterIntensityParam {xcms} | R Documentation |
Remove chromatographic peaks with intensities below the specified threshold.
By default, with nValues = 1
, all peaks with an intensity
>= threshold
are retained. Parameter value
allows to specify the column of
the chromPeaks()
matrix that should be used for the filtering (defaults to
value = "maxo"
and thus evaluating the maximal intensity for each peak).
With nValues > 1
it is possible to keep only peaks that have nValues
intensities >= threshold
. Note that this requires data import from the
original MS files and run time of the call can thus be significantly larger.
Also, for nValues > 1
parameter value
is ignored.
FilterIntensityParam(threshold = 0, nValues = 1L, value = "maxo") ## S4 method for signature 'XCMSnExp,FilterIntensityParam' refineChromPeaks( object, param = FilterIntensityParam(), msLevel = 1L, BPPARAM = bpparam() )
threshold |
|
nValues |
|
value |
|
object |
XCMSnExp object with identified chromatographic peaks. |
param |
|
msLevel |
|
BPPARAM |
parameter object to set up parallel processing. Uses the
default parallel processing setup returned by |
XCMSnExp
object with filtererd chromatographic peaks.
Johannes Rainer, Mar Garcia-Aloy
Other chromatographic peak refinement methods:
CleanPeaksParam
,
MergeNeighboringPeaksParam
## Load a test data set with detected peaks data(faahko_sub) ## Update the path to the files for the local system dirname(faahko_sub) <- system.file("cdf/KO", package = "faahKO") ## Disable parallel processing for this example register(SerialParam()) ## Remove all peaks with a maximal intensity below 50000 res <- refineChromPeaks(faahko_sub, param = FilterIntensityParam(threshold = 50000)) nrow(chromPeaks(faahko_sub)) nrow(chromPeaks(res)) all(chromPeaks(res)[, "maxo"] > 50000) ## Keep only chromatographic peaks that have 3 signals above 20000; we ## perform this on the data of a single file. xdata <- filterFile(faahko_sub) res <- refineChromPeaks(xdata, FilterIntensityParam(threshold = 20000, nValues = 3)) nrow(chromPeaks(xdata)) nrow(chromPeaks(res))