mzR (version 2.6.2)

peaks: Access the raw data from an mzR object.


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.


header(object, scans, ...)

peaksCount(object, scans, ...)

peaks(object, ...)

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


An instantiated mzR object.
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.
a numeric defining the m/z resolution.
Other arguments. A scan parameter can be passed to peaks.

See Also

instrumentInfo for metadata access and the "mzR" class.


 filepath <- system.file("microtofq", package = "msdata")
 file <- list.files(filepath, pattern="MM14.mzML",
                     full.names=TRUE, recursive = TRUE)
 mz <- openMSfile(file)