PeakDetection {MSclassifR} | R Documentation |
Detection of peaks in MassSpectrum
objects.
Description
This function performs a data analysis pipeline to pre-process mass spectra. It provides average intensities and detects peaks using functions of R packages MALDIquant
and MALDIrppa
.
Usage
PeakDetection(x,
averageMassSpec = TRUE,
labels = NULL,
averageMassSpectraMethod = "median",
SNRdetection = 3,
binPeaks = TRUE,
PeakDetectionMethod = "MAD",
halfWindowSizeDetection = 11,
AlignMethod = "strict",
Tolerance = 0.002,
...)
Arguments
x |
a |
averageMassSpec |
a |
labels |
a |
averageMassSpectraMethod |
a |
PeakDetectionMethod |
a |
SNRdetection |
a |
binPeaks |
a |
halfWindowSizeDetection |
a |
AlignMethod |
a |
Tolerance |
a |
... |
other arguments from |
Details
The PeakDetection
function provides an analysis pipeline for MassSpectrum
objects including peaks detection and binning.
All the methods used for PeakDetection
functions are selected from MALDIquant
and MALDIrppa
packages.
Value
Returns a list of MassPeaks
objects (see MALDIquant
R package) for each mass spectrum in x
.
References
Gibb S, Strimmer K. MALDIquant: a versatile R package for the analysis of mass spectrometry data. Bioinformatics. 2012 Sep 1;28(17):2270-1. doi: 10.1093/bioinformatics/bts447. Epub 2012 Jul 12. PMID: 22796955.
Javier Palarea-Albaladejo, Kevin Mclean, Frank Wright, David G E Smith, MALDIrppa: quality control and robust analysis for mass spectrometry data, Bioinformatics, Volume 34, Issue 3, 01 February 2018, Pages 522 - 523, doi: 10.1093/bioinformatics/btx628
Examples
library("MALDIquant")
library("MSclassifR")
## Load mass spectra and metadata
data("CitrobacterRKIspectra", "CitrobacterRKImetadata", package = "MSclassifR")
## Pre-processing of mass spectra
spectra <- SignalProcessing(CitrobacterRKIspectra)
## Detection of peaks in pre-processed mass spectra
peaks <- PeakDetection(x = spectra,
averageMassSpec = FALSE,
labels = CitrobacterRKImetadata$Strain_name_spot,
averageMassSpectraMethod = "median",
SNRdetection = 3,
binPeaks = TRUE,
halfWindowSizeDetection = 11,
AlignFrequency = 0.20,
AlignMethod = "strict",
Tolerance = 0.002)
# Plot peaks on a pre-processed mass spectrum
PlotSpectra(SpectralData=spectra[[1]],Peaks=peaks[[1]],col_spec="blue",col_peak="black")