peakPick-methods: Peak pick an imaging dataset

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Apply peak picking to a mass spectrometry imaging dataset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## 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:

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:

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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())

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: BiocParallel
Loading required package: EBImage
Loading required package: S4Vectors
Loading required package: stats4

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: ProtGenerics

Attaching package:ProtGenericsThe following object is masked frompackage:stats:

    smooth


Attaching package:CardinalThe following object is masked frompackage:stats:

    filter

Cardinal documentation built on Nov. 8, 2020, 11:10 p.m.