createSpectraFromMzML: Create Spectra object from mzML files

View source: R/SpectraFromMzML.R

createSpectraFromMzMLR Documentation

Create Spectra object from mzML files

Description

The function createSpectraFromMzML creates a (single) Spectra object from all mzML files found in path.

Usage

createSpectraFromMzML(path = ".", type = "")

Arguments

path

character, path to mzML files

type

character, if "SRM" or "MRM" the mzML files will be loaded via MSnbase::readSRMData, otherwise the mzML files will be loaded via Spectra::Spectra and the MsBackendMzR()

Details

The functions imports mzML files by either Spectra::Spectra and the MsBackendMzR backend or MSnbase::readSRMData. The entries in the returned Spectra object are separable by Spectra$dataOrigin.

The type argument specifies the underlying technology of the mzML files. Depending on the technology the quantitative information will be stored in different lists within the mzML files. In case of selected reaction monitoring (SRM)- or multiple reaction monitoring (MRM)-derived files, the intensities and m/z values are stored in chromatogram entries within chromatogramList. In this case, type has to be set to "SRM" or "MRM". Typically, the intensities and m/z values are stored in spectrum entries within spectrumList. In this case, type has to be set to any other value than "SRM" or "MRM".

Value

Spectra object

Author(s)

Thomas Naake

Examples

## for non-SRM and non-MRM files
path <- system.file("sciex", package = "msdata")
createSpectraFromMzML(path = path)

## for SRM and MRM files
path <- system.file("srm", package = "MsQualityUtils")
createSpectraFromMzML(path = path, type = "SRM")

tnaake/MsQualityUtils documentation built on Feb. 3, 2023, 6:32 a.m.