View source: R/PeakDetection.R
PeakDetection | R Documentation |
MassSpectrum
objects.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
.
PeakDetection(x,
averageMassSpec = TRUE,
labels = NULL,
averageMassSpectraMethod = "median",
SNRdetection = 3,
binPeaks = TRUE,
PeakDetectionMethod = "MAD",
halfWindowSizeDetection = 11,
AlignMethod = "strict",
Tolerance = 0.002,
...)
x |
a |
averageMassSpec |
a |
labels |
a |
averageMassSpectraMethod |
a |
PeakDetectionMethod |
a |
SNRdetection |
a |
binPeaks |
a |
halfWindowSizeDetection |
a |
AlignMethod |
a |
Tolerance |
a |
... |
other arguments from |
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.
Returns a list of MassPeaks
objects (see MALDIquant
R package) for each mass spectrum in x
.
Gibb S, Strimmer K. MALDIquant: a versatile R package for the analysis of mass spectrometry data. Bioinformatics. 2012 Sep 1;28(17):2270-1. \Sexpr[results=rd]{tools:::Rd_expr_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, \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1093/bioinformatics/btx628")}
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.