peaks: Access the raw data from an 'mzR' object.

Description Usage Arguments Author(s) See Also Examples

Description

Access the MS raw data. The peaks and peaksCount functions return the (m/z,intensity) pairs and the number peaks in the spectrum/spectra. peaks returns a single matrix if scans is a numeric of length 1 and a list of matrices if several scans are asked for or no scans argument is provided (i.e all spectra in the oject are retured). peaksCount will return a numeric of length n.

The header function returns a list containing seqNum, acquisitionNum , msLevel, peaksCount, totIonCurrent, retentionTime, basePeakMZ, basePeakIntensity, collisionEnergy, ionisationEnergy, lowM, highMZ, precursorScanNum, precursorMZ, precursorCharge, precursorIntensity, mergedScan, mergedResultScanNum, mergedResultStartScanNum and mergedResultEndScanNum, when available in the original file. If multiple scans are queried, a data.frame is returned with the scans reported along the rows.

The get3Dmap function performs a simple resampling between lowMz and highMz with reMz resolution. A matrix of dimensions length(scans) times seq(lowMz,highMz,resMz) is returned.

Usage

1
2
3
4
5
6
7
 header(object, scans, ...)

 peaksCount(object, scans, ...)

 peaks(object, scans, ...)

 get3Dmap(object, scans, lowMz, highMz, resMz, ...)

Arguments

object

An instantiated mzR object.

scans

A numeric specifying which scans to return. Optional for the header, peaks and peaksCount methods. If ommited, the requested data for all peaks is returned.

lowMz, highMz

Numerics defining the m/z range to be returned.

resMz

a numeric defining the m/z resolution.

...

Other arguments. Currently ignored.

Author(s)

Steffen Neumann and Laurent Gatto

See Also

instrumentInfo for metadata access and the "mzR" class.

Examples

1
2
3
4
5
6
7
8
 library(msdata)
 filepath <- system.file("microtofq", package = "msdata")
 file <- list.files(filepath, pattern="MM14.mzML",
                    full.names=TRUE, recursive = TRUE)
  mz <- openMSfile(file)
  runInfo(mz)
  colnames(header(mz))
  close(mz)

sneumann/mzR-playground documentation built on May 30, 2019, 6 a.m.