Getting Started with the peakPantheR package

BiocStyle::markdown()
knitr::opts_chunk$set(
    collapse = TRUE,
    comment = "#>"
)

Package: r Biocpkg("peakPantheR")
Authors: Arnaud Wolfer

## Silently loading all packages
library(BiocStyle)
library(peakPantheR)
library(faahKO)
library(pander)

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

Overview

peakPantheR implements functions to detect, integrate and report pre-defined features in MS files (e.g. compounds, fragments, adducts, ...).

It is designed for:

peakPantheR can process LC/MS data files in NetCDF, mzML/mzXML and mzData format as data import is achieved using Bioconductor's r Biocpkg("mzR") package.

Installation

To install peakPantheR from Bioconductor:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("peakPantheR")

Install the development version of peakPantheR directly from GitHub with:

# Install devtools
if(!require("devtools")) install.packages("devtools")
devtools::install_github("phenomecentre/peakPantheR")

Input Data

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

MS files

For demonstration purpose we can annotate a set a set of raw MS spectra (in NetCDF format) provided by the r Biocpkg("faahKO") package. Briefly, this subset of the data from [@Saghatelian04] invesigate the metabolic consequences of knocking out the fatty acid amide hydrolase (FAAH) gene in mice. The dataset consists of samples from the spinal cords of 6 knock-out and 6 wild-type mice. Each file contains data in centroid mode acquired in positive ion mode form 200-600 m/z and 2500-4500 seconds.

Below we install the r Biocpkg("faahKO") package and locate raw CDF files of interest:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("faahKO")
library(faahKO)
## file paths
input_spectraPaths  <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"),
                        system.file('cdf/KO/ko16.CDF', package = "faahKO"),
                        system.file('cdf/KO/ko18.CDF', package = "faahKO"))
input_spectraPaths

Expected regions of interest

Expected regions of interest (targeted features) are specified using the following information:

Below we define 2 features of interest that are present in the r Biocpkg("faahKO") dataset and can be employed in subsequent vignettes:

# targetFeatTable
input_targetFeatTable <- data.frame(matrix(vector(), 2, 8, dimnames=list(c(), 
                        c("cpdID", "cpdName", "rtMin", "rt", "rtMax", "mzMin", 
                        "mz", "mzMax"))), stringsAsFactors=FALSE)
input_targetFeatTable[1,] <- c(1, "Cpd 1", 3310., 3344.888, 3390., 522.194778, 
                                522.2, 522.205222)
input_targetFeatTable[2,] <- c(2, "Cpd 2", 3280., 3385.577, 3440., 496.195038,
                                496.2, 496.204962)
input_targetFeatTable[,c(1,3:8)] <- sapply(input_targetFeatTable[,c(1,3:8)], 
                                            as.numeric)
# use pandoc for improved readability
input_targetFeatTable <- data.frame(matrix(vector(), 2, 8, dimnames=list(c(), 
                        c("cpdID", "cpdName", "rtMin", "rt", "rtMax", "mzMin", 
                        "mz", "mzMax"))), stringsAsFactors=FALSE)
input_targetFeatTable[1,] <- c(1, "Cpd 1", 3310., 3344.888, 3390., 522.194778, 
                                522.2, 522.205222)
input_targetFeatTable[2,] <- c(2, "Cpd 2", 3280., 3385.577, 3440., 496.195038,
                                496.2, 496.204962)
input_targetFeatTable[,c(1,3:8)] <- sapply(input_targetFeatTable[,c(1,3:8)], 
                                            as.numeric)
rownames(input_targetFeatTable) <- NULL
pander::pandoc.table(input_targetFeatTable, digits = 9)

See Also

References



Try the peakPantheR package in your browser

Any scripts or data that you put into this service are public.

peakPantheR documentation built on April 29, 2020, 5:23 a.m.