MSnbase (version 1.20.7)

readMSData: Imports mass-spectrometry raw data files as 'MSnExp' instances.

Description

Reads as set of XML-based mass-spectrometry data files and generates an "MSnExp" object. This function uses the functionality provided by the mzR package to access data and meta data in mzData, mzXML and mzML.

Usage

readMSData(files, pdata = NULL, msLevel = 2, verbose = TRUE, centroided = FALSE, smoothed = FALSE, removePeaks = 0, clean = FALSE, cache = 1)

Arguments

files
character vector with file names to be read.
pdata
an object of class "NAnnotatedDataFrame".
msLevel
MS level spectra to be read. Use '1' for MS1 spectra or any larger numeric for MSn spectra. Default is '2'.
centroided
Logical indicating whether spectra are centroided or not. Default is 'FALSE'. Used to initialise "MSnProcess" object in processingData slot.
smoothed
Logical indicating whether spectra already smoothed or not. Default is 'FALSE'. Used to initialise "MSnProcess" object in processingData slot.
removePeaks
If > 0 (default), all peaks less or equal then value will set to 0. See removePeaks for more details and examples.
clean
Logical indicating whether 0 intensity peaks should be discarded from spectra. Useful is removePeaks is set. Default is 'FALSE'. See clean for more details and examples.
cache
Numeric indicating caching level. Default is 0 for MS1 and 1 MS2 (or higher). Under development.
verbose
verbosity flag.

Value

An "MSnExp" object.

See Also

"MSnExp" or readMgfData to read mgf peak lists.

Examples

Run this code
file <- dir(system.file(package="MSnbase",dir="extdata"),
            full.name=TRUE,
            pattern="mzXML$")
aa <- readMSData(file)
aa

Run the code above in your browser using DataLab