PeakList {tofsims} | R Documentation

## Class PeakList

### Description

Class PeakList is an extension of TIC class that can hold information about peaks.

Class `PeakList` inherits from the classes `MassAnalysis`, `MassSpectra` and `TIC`.

`PeakList` class constructor

### Usage

    PeakList(analysisName = NULL, instrument = NULL, nz = NULL,
      calibration = NULL, calibPoints = NULL, mz = NULL, peakIDs = NULL,
      peakMzs = NULL, ...)

    PeakList(analysisName = NULL, instrument = NULL, nz = NULL,
      calibration = NULL, calibPoints = NULL, mz = NULL, peakIDs = NULL,
      peakMzs = NULL, ...)

### Arguments

`analysisName` | character vector with the import filename
`instrument` | character vector type of instrument used in the experiment
`nz` | matrix numeric containing ion counts, rows are image points, column toftimes/mass to charge ratios
`calibration` | data frame for numerics slope and intercept of the mass calibration
`calibPoints` | data frame for time of flight to maass to charge calibration
`mz` | vector same length as columns in `nz` for mass to charge values
`peakIDs` | matrix integer ID for peaks
`peakMzs` | matrix with mass to charge values for lower, middle and upper peak values
`...` | additional args

### Details

The `PeakList` class constructor is used to construct a new PeakList object. Input are currently all needed variables.

### Value

object of class PeakList

### Slots

`peakIDs`

  matrix integer ID for peaks

`peakMzs`

  matrix with mass to charge values for lower, middle and upper peak values

### Author(s)

Lorenz Gerber <lorenz.gerber@slu.se>

Lorenz Gerber <lorenz.gerber@slu.se>

### Examples

    # The typical way to obtain a PeakList object is by
    # applying some peak picking method to a MassSpectra
    # below an example using the 'unitMassPeaks' method
    library(tofsimsData)
    data(tofsimsData)
    testSpectra<-calibPointNew(testSpectra, mz = 15, value = 15.01551)
    testSpectra<-calibPointNew(testSpectra, mz = 181, value = 181.0228)
    testSpectra<-recalibrate(testSpectra)
    testSpectra<-unitMassPeaks(testSpectra, mzRange = c(1,200), widthAt = c(15, 181),
    factor = c(0.4, 0.6), lower = c(14.97, 15.05), upper = c(180.84, 181.43))
    show(testSpectra)

[Package tofsims version 1.16.0 Index]