peakPantheR v1.2.0


Monthly downloads



Peak Picking and Annotation of High Resolution Experiments

An automated pipeline for the detection, integration and reporting of predefined features across a large number of mass spectrometry data files.



Build Status codecov


Package for Peak Picking and ANnoTation of High resolution Experiments in R, implemented in R and Shiny


peakPantheR implements functions to detect, integrate and report pre-defined features in MS files. It is designed for:

  • Real time feature detection and integration (see Real Time Annotation)
    • process multiple compounds in one file at a time
  • Post-acquisition feature detection, integration and reporting (see Parallel Annotation)
    • process multiple compounds in multiple files in parallel, store results in a single object


Install the development version of the package directly from GitHub with:

# Install devtools
if(!require("devtools")) install.packages("devtools")

If the dependencies mzR and MSnbase are not successfully installed, Bioconductor must be added to the default repositories with:



Both real time and parallel compound integration require a common set of information:

  • Path(s) to netCDF / mzML MS file(s)
  • An expected region of interest (RT / m/z window) for each compound.


More information is available in the following vignettes:

peakPantheR is licensed under the GPLv3

As a summary, the GPLv3 license requires attribution, inclusion of copyright and license information, disclosure of source code and changes. Derivative work must be available under the same terms.

© National Phenome Centre (2018)

Functions in peakPantheR

Name Description
generateIonChromatogram Generate ion chromatogram from raw data points
peakFit,peakPantheRAnnotation-method peakFit accessor
is.peakPantheR_curveFit Check if object is of class peakPantheR_curveFit
outputAnnotationResult,peakPantheRAnnotation-method Save to disk all annotation results as csv files Save to disk all annotation results as annotationName_ ... .csv files: compound metadata (cpdMetadata, cpdID, cpdName) and spectra metadata (spectraMetadata, acquisitionTime, TIC), summary of fit (ratio of peaks found: ratio_peaks_found, ratio of peaks filled: ratio_peaks_filled, mean ppm_error: ppm_error, mean rt_dev_sec: rt_dev_sec), and a file for each column of peakTables (with samples as rows and compounds as columns)
plotHistogram Plot variable histogram and density
resetAnnotation,peakPantheRAnnotation-method Reset a peakPantheRAnnotation and alter samples and compounds information Reset a peakPantheRAnnotation (remove results and set isAnnotated=FALSE). If a different number of samples (spectraPaths) or compounds (targetFeatTable) are passed, the object will be initialised to the new size. For input values left as NULL, the slots (filepath (from spectraPaths), ROI, cpdID, cpdName (from targetFeatTable), uROI, FIR, cpdMetadata, spectraMetadata, uROIExist, useUROI and useFIR) will be filled with values from previousAnnotation.
predictCurve Predict curve values
plotPeakwidth Plot peak value and peakwidth by acquisition time or in input order
plotEICFit Plot samples raw data and detected feature for a single ROI
skewedGaussian_minpack.lm Implementation of the Skewed Gaussian peak shape for use with minpack.lm
plotEICDetectedPeakwidth Plot samples raw data and detected feature for a single ROI
isAnnotated,peakPantheRAnnotation-method isAnnotated accessor
skewedGaussian_guess Guess function for initial skewed gaussian parameters and bounds
spectraMetadata,peakPantheRAnnotation-method spectraMetadata accessor
skewedGaussian_minpack.lm_objectiveFun Skewed Gaussian minpack.lm objective function
peakTables,peakPantheRAnnotation-method peakTables accessor with cpdID and cpdName added back
peakPantheR_singleFileSearch Search, integrate and report targeted features in a raw spectra
nbCompounds,peakPantheRAnnotation-method nbCompounds accessor established on cpdID
nbSamples,peakPantheRAnnotation-method nbSamples accessor established on filepath
extractSignalRawData Extract signal in a multiple defined mz rt window from a raw data file
peakPantheR peakPantheR: A package for Peak Picking and ANnoTation of High resolution Experiments
outputAnnotationParamsCSV,peakPantheRAnnotation-method Save annotation parameters as CSV Save annotation parameters (ROI, uROI and FIR) to disk as a CSV file for editing
outputAnnotationDiagnostic,peakPantheRAnnotation-method Save to disk the annotation parameters as CSV and a diagnostic plot per fitted compound Save to disk the annotation parameters as CSV (as generated by outputAnnotationParamsCSV()) and a diagnostic plot per fitted compound (as generated by annotationDiagnosticMultiplot()) if savePlots is TRUE
[,peakPantheRAnnotation,ANY,ANY,ANY-method extract parts of peakPantheRAnnotation class
uROI,peakPantheRAnnotation-method uROI accessor returns targetFeatTable with cpdID, cpdName added
getTargetFeatureStatistic Calculate chromatographic peak properties
integrateFIR Integrate fallback integration regions
peakPantheR_parallelAnnotation Search, integrate and report targeted features in a multiple spectra
peakPantheR_loadAnnotationParamsCSV Load fit parameters from CSV
peakPantheRAnnotation An S4 class to represent peakPantheR annotation results
saveSingleFileMultiEIC Save to disk a plot of all ROI EIC and detected feature range
uROIExist,peakPantheRAnnotation-method uROIExist accessor
useUROI,peakPantheRAnnotation-method useUROI accessor
useFIR,peakPantheRAnnotation-method useFIR accessor
skew_erf Gaussian Error function
annotationTable,peakPantheRAnnotation-method annotationTable accessor annotationTable returns a dataframe (row samples, col compounds) filled with a specific peakTable column
cpdID,peakPantheRAnnotation-method cpdID accessor
cpdName,peakPantheRAnnotation-method cpdName accessor
EICs,peakPantheRAnnotation-method EICs accessor
cpdMetadata,peakPantheRAnnotation-method cpdMetadata accessor
ROI,peakPantheRAnnotation-method ROI accessor returns targetFeatTable with cpdID, cpdName added
FIR,peakPantheRAnnotation-method FIR accessor returns targetFeatTable with cpdID, cpdName added
annotationDiagnosticPlots,peakPantheRAnnotation-method Generate fit diagnostic plots Generate fit diagnostic plots for each ROI: EICFit the raw data and detected feature fit, rtPeakwidthVert detected peaks retention time apex and peakwidth (vertical and no run order), rtPeakwidthHorzRunOrder detected peaks retention time apex and peakwidth by run order, mzPeakwidthHorzRunOrder detected peaks m/z apex and peakwidth by run order, areaRunOrder detected peaks area by run order, rtHistogram histogram of detected peaks retention time, mzHistogram histogram of detected peaks m/z, areaHistogram histogram of detected peaks area.
TIC,peakPantheRAnnotation-method TIC accessor
filename,peakPantheRAnnotation-method filename accessor by spliting filepath
getAcquisitionDatemzML Parse acquisition date from a mzML file
acquisitionTime,peakPantheRAnnotation-method acquisitionTime accessor returns value as.POSIXct
filepath,peakPantheRAnnotation-method filepath accessor
annotationDiagnosticMultiplot Generate a multiplot of all diagnostic plots
dataPoints,peakPantheRAnnotation-method dataPoints accessor
annotationParamsDiagnostic,peakPantheRAnnotation-method Set uROI and FIR based on annotation results Set updated ROI (uROI) and Fallback Integration Regions (FIR) based on the annotation results. If the object is not annotated, it is returned untouched. ROI is not modified. If uROI exist they are left untouched, otherwise they are set as the minimum and maximum found peaks limits (+/-5% of ROI in retention time). If FIR are used they are left untouched, otherwise they are set as the median of the found limits (rtMin, rtMax, mzMin, mzMax).
findTargetFeatures Find and integrate target features in each ROI
fitCurve Curve fitting using minpack.lm
No Results!

Vignettes of peakPantheR

No Results!

Last month downloads


Date 2018-07-08
biocViews MSnbase (>= 2.4.0), mzR (>= 2.12.0)
License GPL-3
Encoding UTF-8
LazyData true
RoxygenNote 6.0.1
VignetteBuilder knitr
NeedsCompilation no
Packaged 2018-07-09 08:59:41 UTC; aw4212
Repository CRAN
Date/Publication 2018-07-10 17:00:03 UTC

Include our badge in your README