Skip to contents

The methods listed on this page are XCMSnExp() methods inherited from its parent, the MSnbase::OnDiskMSnExp() class from the MSnbase package, that alter the raw data or are related to data subsetting. Thus calling any of these methods causes all xcms pre-processing results to be removed from the XCMSnExp() object to ensure its data integrity.

bin(): allows to bin spectra. See MSnbase::bin() documentation in the MSnbase package for more details and examples.

clean(): removes unused 0 intensity data points. See MSnbase::clean() documentation in the MSnbase package for details and examples.

filterAcquisitionNum(): filters the XCMSnExp() object keeping only spectra with the provided acquisition numbers. See MSnbase::filterAcquisitionNum() for details and examples.

The normalize() method performs basic normalization of spectra intensities. See MSnbase::normalize() documentation in the MSnbase package for details and examples.

The pickPeaks() method performs peak picking. See documentation for that function in the MSnbase package for details and examples.

The removePeaks() method removes mass peaks (intensities) lower than a threshold. Note that these peaks refer to mass peaks, which are different to the chromatographic peaks detected and analyzed in a metabolomics experiment! See MSnbase::removePeaks() documentation for details and examples.

The smooth() method smooths spectra. See MSnbase::smooth() documentation in MSnbase for details and examples.

Usage

# S4 method for class 'XCMSnExp'
bin(x, binSize = 1L, msLevel.)

# S4 method for class 'XCMSnExp'
clean(object, all = FALSE, verbose = FALSE, msLevel.)

# S4 method for class 'XCMSnExp'
filterAcquisitionNum(object, n, file)

# S4 method for class 'XCMSnExp'
normalize(object, method = c("max", "sum"), ...)

# S4 method for class 'XCMSnExp'
pickPeaks(
  object,
  halfWindowSize = 3L,
  method = c("MAD", "SuperSmoother"),
  SNR = 0L,
  ...
)

# S4 method for class 'XCMSnExp'
removePeaks(object, t = "min", verbose = FALSE, msLevel.)

# S4 method for class 'XCMSnExp'
smooth(
  x,
  method = c("SavitzkyGolay", "MovingAverage"),
  halfWindowSize = 2L,
  verbose = FALSE,
  ...
)

Arguments

x

XCMSnExp() or MSnbase::OnDiskMSnExp() object.

binSize

numeric(1) defining the size of a bin (in Dalton).

msLevel.

For bin(), clean(), filterMsLevel(), removePeaks(): integer(1) defining the MS level(s) to which operations should be applied or to which the object should be subsetted.

object

XCMSnExp or OnDiskMSnExp object.

all

For clean(): logical(1), if TRUE all zeros are removed.

verbose

logical(1) whether progress information should be displayed.

n

For filterAcquisitionNum(): integer defining the acquisition numbers of the spectra to which the data set should be sub-setted.

file

For filterAcquisitionNum(): integer defining the file index within the object to subset the object by file.

method

For normalize(): character(1) specifying the normalization method. See MSnbase::normalize() in the MSnbase package for details. For pickPeaks(): character(1) defining the method. See help for pickPeaks() in the MSnbase package for options. For smooth(): character(1) defining the method. See MSnbase::smooth() in the MSnbase package for options and details.

...

Optional additional arguments.

halfWindowSize

For pickPeaks() and smooth(): integer(1) defining the window size for the peak picking. See help for pickPeaks and [MSnbase::smooth()` in the MSnbase package for details and options.

SNR

For pickPeaks(): numeric(1) defining the signal to noise ratio to be considered. See the documentation for pickPeaks() in the MSnbase package for details.

t

For removePeaks(): either a numeric(1) or "min" defining the threshold (method) to be used. See MSnbase::removePeaks() for details.

Value

For all methods: a XCMSnExp object.

See also

XCMSnExp-filter for methods to filter and subset XCMSnExp objects. XCMSnExp() for base class documentation. MSnbase::OnDiskMSnExp() for the documentation of the parent class.

Author

Johannes Rainer