storeResults: Save xcms result objects in a specified format

storeResultsR Documentation

Save xcms result objects in a specified format

Description

The storeResults function saves an object resulting from processing with the xcms package (mainly XcmsExperiment). Multiple formats for storing and exporting are available and can be defined by the param argument.

Supported param objects are:

  • RDataParam: Save in an .RData format file. The name of the file can be specified in the fileName argument.

  • PlainTextParam: Store MsExperiment and XcmsExperiment objects as a folder of plain text files, folder path defined in the path argument.

  • MzTabMParam: Save in MzTab format (to be defined).

For specific examples, see the help pages of the individual parameter classes listed above.

Usage

storeResults(object, param, ...)

Arguments

object

MsExperiment or XcmsExperiment The data object that needs to be saved.

param

The parameter object selecting and configuring the format for saving. It can be one of the following classes: RDataParam, PlainTextParam, or MzTabMParam.

...

Optional parameters.

Author(s)

Philippine Louail

Examples


## Load a test data set with detected peaks
library(xcms)
library(MsExperiment)
faahko_sub <- loadXcmsData("faahko_sub2")

## Set up parameter to save as .RData file
param <- RDataParam(fileName = "example_xcms_results")

## save as .RData
storeResults(object = faahko_sub, param = param)

## Set up parameter to save as a collection of plain text file
param <- PlainTextParam(path = "test/path/")

## Save as a collection of plain text files
storeResults(object = faahko_sub, param = param)


sneumann/xcms documentation built on April 26, 2024, 3:05 a.m.