peakPick-methods {Cardinal} | R Documentation

## Peak pick an imaging dataset

### Description

Apply peak picking to a mass spectrometry imaging dataset.

### Usage

    ## S4 method for signature 'MSImagingExperiment'
    peakPick(object, method = c("mad", "simple", "adaptive"), ...)

    ## S4 method for signature 'MSImageSet'
    peakPick(object, method = c("simple", "adaptive", "limpic"),
        ...,
        pixel = pixels(object),
        plot = FALSE)

    ## Local maxima and SNR with noise based on local MAD
    peakPick.mad(x, SNR=6, window=5, blocks=1, fun=mean, tform=diff, ...)

    ## Local maxima and SNR with constant noise based on SD
    peakPick.simple(x, SNR=6, window=5, blocks=100, ...)

    ## Local maxima and SNR with adaptive noise based on SD
    peakPick.adaptive(x, SNR=6, window=5, blocks=100, spar=1, ...)

    ## LIMPIC peak detection
    peakPick.limpic(x, SNR=6, window=5, blocks=100, thresh=0.75, ...)

### Arguments

`object` | An imaging dataset.
`method` | The peak picking method to use.
`pixel` | The pixels to peak pick. If less than the extent of the dataset, this will result in a subset of the data being processed.
`plot` | Plot the mass spectrum for each pixel while it is being processed?
`...` | Additional arguments passed to the peak picking method.
`x` | The mass spectrum to be peak picked.
`SNR` | The minimum signal-to-noise ratio to be considered a peak.
`window` | The window width for seeking local maxima.
`blocks` | The number of blocks in which to divide the mass spectrum in order to calculate the noise.
`fun` | The function used to estimate centrality and average absolute deviation.
`tform` | A transformation to be applied to the mass spectrum before estimating noise.
`spar` | Smoothing parameter for the spline smoothing applied to the spectrum in order to decide the cutoffs for throwing away false noise spikes that might occur inside peaks.
`thresh` | The thresholding quantile to use when comparing slopes in order to throw away peaks that are too flat.

### Details

Peak picking is usually performed using the provided functions, but a user-created function can also be passed to `method`. In this case it should take the following arguments:

- `x`: A `numeric` vector of intensities.

- `...`: Additional arguments.

When applied to an `MSImagingExperiment` object, a user-created function should return a `integer` vector giving the indices of the detected peaks.

When applied to an `MSImageSet` object, a user-created function should return a `list` with two vectors of the same length as `x`:

- `peaks`: A `logical` vector indicating peaks.

- `noise`: A `numeric` vector with the estimated noise.

Internally, `pixelApply` is used to apply the peak picking. See its documentation page for more details on additional objects available to the environment installed to the peak picking function.

### Value

An object of the same class with the peak picked spectra. Note that the full mass range is retained and the peaks are unaligned, so `peakAlign` should be called before applying further methods.

### Author(s)

Kylie A. Bemis

### References

Mantini, D., Petrucci, F., Pieragostino, D., Del Boccio, P., Di Nicola, M., Di Ilio, C., et al. (2007). LIMPIC: a computational method for the separation of protein MALDI-TOF-MS signals from noise. BMC Bioinformatics, 8(101), 101. doi:10.1186/1471-2105-8-101

### See Also

`MSImagingExperiment`, `MSImageSet`, `peakAlign`, `peakFilter`, `peakBin`, `reduceDimension`, `pixelApply`, `process`

### Examples

    setCardinalBPPARAM(SerialParam())

    set.seed(2)
    data <- simulateImage(preset=1, npeaks=10, dim=c(3,3))
    data <- data[,pData(data)$circle]

    # queue peak picking
    data <- peakPick(data, method="simple", SNR=6)

    # apply peak picking
    data_peaks <- process(data, plot=interactive())

[Package Cardinal version 2.8.0 Index]