
Remove intensities from chromatographic data
Source:R/methods-Chromatogram.R, R/methods-MChromatograms.R, R/methods-XChromatogram.R
removeIntensity-Chromatogram.RdremoveIntensities allows to remove intensities from chromatographic data
matching certain conditions (depending on parameter which). The
intensities are actually not removed but replaced with NA_real_. To
actually remove the intensities (and the associated retention times)
use MSnbase::clean() afterwards.
Parameter which allows to specify which intensities should be replaced by
NA_real_. By default (which = "below_threshod" intensities below
threshold are removed. If x is a XChromatogram or XChromatograms
object (and hence provides also chromatographic peak definitions within the
object) which = "outside_chromPeak" can be selected which removes any
intensity which is outside the boundaries of identified chromatographic
peak(s) in the chromatographic data.
Note that filterIntensity() might be a better approach to
subset/filter chromatographic data.
Usage
# S4 method for class 'Chromatogram'
removeIntensity(object, which = "below_threshold", threshold = 0)
# S4 method for class 'MChromatograms'
removeIntensity(object, which = "below_threshold", threshold = 0)
# S4 method for class 'XChromatogram'
removeIntensity(
object,
which = c("below_threshold", "outside_chromPeak"),
threshold = 0
)Arguments
- object
an object representing chromatographic data. Can be a
MSnbase::Chromatogram(),MSnbase::MChromatograms(),XChromatogram()orXChromatograms()object.- which
character(1)defining the condition to remove intensities. See description for details and options.- threshold
numeric(1)defining the threshold below which intensities are removed (ifwhich = "below_threshold").