Extracts data from mzML files using parsers from either RaMS or mzR.
Arguments
- path
Path to
.mzmlfile.- format_out
Class of output. Either
matrix,data.frame, ordata.table. Applies only to theTIC,BPC,DADandchromsin wide format.- data_format
Whether to return data in
wide(default) orlongformat.- parser
What parser to use. Either
RaMSormzR.- what
What types of data to return (argument to RaMS::grabMSdata). Options include
MS1,MS2,BPC,TIC,DAD,chroms,metadata, oreverything. Defaults to all of them.EICandEIC_MS2return extracted ion chromatograms from the MS1 or MS2 data for the masses given by themzandppmarguments of RaMS::grabMSdata, passed through....- verbose
Argument to
grabMSdatacontrolling verbosity. Ignored by mzR.- ...
Additional arguments to
grabMSdata. Ignored by mzR.
Details
Both parsers return a list with one element per stream in
what. Mass spectra and EICs are always long. With data_format = "wide" (the
default), TIC and BPC are returned as 2D chromatograms of class
format_out, and DAD as a wide chromatogram of class format_out; with
"long", every stream is a long data.table.
The chroms stream holds the chromatograms stored in the file, such as the
SIM and SRM traces of a triple quadrupole run. In wide format it is a list
of 2D chromatograms named by their ID in the file (or Chromatogram 1,
Chromatogram 2 and so on where it has none), each with the precursor_mz
and product_mz it monitors as attributes. If any trace repeats a retention
time, as in some malformed files, the whole stream is returned as the long
data.table instead, with a warning.
The mzR parser reads files that RaMS cannot, such as those compressed with
MS-Numpress. It returns only MS1, MS2, BPC, TIC and DAD, and no
file metadata. Its TIC and BPC are the per-scan values recorded in the
MS1 spectra.
