grabSpectraMz: Extract the mass-to-charge data from the spectra of an mzML...

View source: R/grabMzmlFunctions.R

grabSpectraMzR Documentation

Extract the mass-to-charge data from the spectra of an mzML nodeset

Description

The mz and intensity information of mzML files are encoded as binary arrays, sometimes compressed via gzip or zlib or numpress. This code finds all the m/z binary arrays and converts them back to the original measurements. See https://github.com/ProteoWizard/pwiz/issues/1301

Usage

grabSpectraMz(xml_nodes, file_metadata)

Arguments

xml_nodes

An xml_nodeset object corresponding to the spectra collected by the mass spectrometer, usually produced by applying 'xml_find_all' to an MS1 or MS2 nodeset.

file_metadata

Information about the file used to decode the binary arrays containing m/z and intensity information. Here, the compression and mz precision information is relevant.

Value

A numeric vector of masses, many for each scan.


RaMS documentation built on Oct. 9, 2024, 9:06 a.m.