Learn R Programming

MetaboAnalystR 2.0: From Raw Spectra to Biological Insights

Description

MetaboAnalystR 2.0 contains the R functions and libraries underlying the popular MetaboAnalyst web server, including > 500 functions for metabolomic data analysis, visualization, and functional interpretation. The package is synchronized with the MetaboAnalyst web server. After installing and loading the package, users will be able to reproduce the same results from their local computers using the corresponding R command history downloaded from MetaboAnalyst, thereby achieving maximum flexibility and reproducibility. With version 2.0, we aim to address two important gaps left in its previous version. First, raw spectral processing - the previous version offered very limited support for raw spectra processing and peak annotation. Therefore, we have implemented comprehensive support for raw LC-MS spectral data processing including peak picking, peak alignment and peak annotations leveraging the functionality of the xcms (PMIDs: 16448051, 19040729, and 20671148; version 3.4.4) and CAMERA (PMID: 22111785; version 1.38.1) R packages. Second, we have enhanced support for functional interpretation directly from m/z peaks. In addition to an efficient implementation of the mummichog algorithm (PMID: 23861661), we have added a new method to support pathway activity prediction based on the well-established GSEA algorithm (PMID: 16199517). To demonstrate this new functionality, we provide the "MetaboAnalystR 2.0 Workflow: From Raw Spectra to Biological Insights" vignette, available here as a PDF. In this vignette, we perform end-to-end metabolomics data analysis on a subset of clinical IBD samples.

Getting Started

Step 1. Install package dependencies

To use MetaboAnalystR 2.0, first install all package dependencies. Ensure that you are able to download packages from bioconductor. To install package dependencies, there are two options:

Option 1

Enter the R function (metanr_packages) and then use the function. A printed message will appear informing you whether or not any R packages were installed.

Function to download packages:

metanr_packages <- function(){

  metr_pkgs <- c("Rserve", "ellipse", "scatterplot3d", "Cairo", "randomForest", "caTools", "e1071", "som", "impute", "pcaMethods", "RJSONIO", "ROCR", "globaltest", "GlobalAncova", "Rgraphviz", "preprocessCore", "genefilter", "pheatmap", "SSPA", "sva", "Rcpp", "pROC", "data.table", "limma", "car", "fitdistrplus", "lars", "Hmisc", "magrittr", "methods", "xtable", "pls", "caret", "lattice", "igraph", "gplots", "KEGGgraph", "reshape", "RColorBrewer", "tibble", "siggenes", "plotly", "xcms", "CAMERA", "fgsea", "MSnbase")
  
  list_installed <- installed.packages()
  
  new_pkgs <- subset(metr_pkgs, !(metr_pkgs %in% list_installed[, "Package"]))
  
  if(length(new_pkgs)!=0){
    
    source("https://bioconductor.org/biocLite.R")
    biocLite(new_pkgs, dependencies = TRUE, ask = FALSE)
    print(c(new_pkgs, " packages added..."))
  }
  
  if((length(new_pkgs)<1)){
    print("No new packages added...")
  }
}

Usage of function:

metanr_packages()

Option 2

Use the pacman R package (for those with >R 3.5.1).

install.packages("pacman")

library(pacman)

pacman::p_load(Rserve, ellipse, scatterplot3d, Cairo, randomForest, caTools, e1071, som, impute, pcaMethods, RJSONIO, ROCR, globaltest, GlobalAncova, Rgraphviz, preprocessCore, genefilter, pheatmap, SSPA, sva, Rcpp, pROC, data.table, limma, car, fitdistrplus, lars, Hmisc, magrittr, methods, xtable, pls, caret, lattice, igraph, gplots, KEGGgraph, reshape, RColorBrewer, tibble, siggenes, plotly, xcms, CAMERA, fgsea, MSnbase)

Step 2. Install the package

MetaboAnalystR 2.0 is freely available from GitHub. The package documentation, including the vignettes for each module and user manual is available within the downloaded R package file. If all package dependencies were installed, you will be able to install the MetaboAnalylstR 2.0 . There are three options, A) using the R package devtools, B) cloning the github, C) manually downloading the .tar.gz file. Note that the MetaboAnalystR 2.0 github will have the most up-to-date version of the package.

Option A) Install the package directly from github using the devtools package. Open R and enter:

Due to issues with Latex, some users may find that they are only able to install MetaboAnalystR 2.0 without any documentation (i.e. vignettes).

# Step 1: Install devtools
install.packages("devtools")
library(devtools)

# Step 2: Install MetaboAnalystR without documentation
devtools::install_github("xia-lab/MetaboAnalystR")

# Step 2: Install MetaboAnalystR with documentation
devtools::install_github("xia-lab/MetaboAnalystR", build_vignettes=TRUE)

Option B) Clone Github and install locally

The * must be replaced by what is actually downloaded and built.


git clone https://github.com/xia-lab/MetaboAnalystR.git
R CMD build metaboanalystr
R CMD INSTALL MetaboAnalystR_*.tar.gz

Option C) Manual download of MetaboAnalystR_2.0.0.tar.gz and install locally

Manually download the .tar.gz file from here. The * must be replaced by what is actually downloaded and built.

cd ~/Downloads
R CMD INSTALL MetaboAnalystR_*.tar.gz

Case Studies

MetaboAnalyst 2.0 Workflow: From Raw Spectra to Biological Insights

In this tutorial, we showcase how to utilize MetaboAnalystR 2.0 to perform a comprehensive end-to-end metabolomics data workflow from raw data preprocessing to knowledge-based analysis. The dataset showcased in the tutorial consists of a subset of pediatric IBD stool samples obtained from the Integrative Human Microbiome Project Consortium (https://ibdmdb.org/). The tutorial is available as a PDF here and is also available inside the R package as a vignette.

MetaboAnalyst 1.0

To demonstrate the functionality, flexibility, and scalability of the MetaboAnalystR v1.0.0 package, three use-cases using two sets of metabolomics data is available here. In this folder you will find detailed discussions and comparisons with the MetaboAnalyst web-platform.

Tutorials

For detailed tutorials on how to use MetaboAnalystR 2.0, please refer to the R package vignettes. These vignettes include detailed step-by-step workflows with example data for each of the main MetaboAnalytR 2.0 modules (11), a case-study showcasing the new end-to-end functionality of MetaboAnalystR 2.0, as well as an example that demonstrates the ease of using XCMS and MetaboAnalystR 1.0 for a holisitic metabolomic data analysis (deprecated). Note, the functions below work only if the R package vignettes were built.

Within R:

vignette(package="MetaboAnalystR")

Within a web-browser:

browseVignettes("MetaboAnalystR")

Citation

MetaboAnalystR 2.0 has been developed by the XiaLab at McGill University.

The R package (Version 1.0.0) has been published!

We encourage users to further develop the package to suit their needs. If you use the R package, please cite us: Chong, Jasmine, and Jianguo Xia. "MetaboAnalystR: an R package for flexible and reproducible analysis of metabolomics data." Bioinformatics 34.24 (2018): 4313-4314.

Within R:

citation("MetaboAnalystR")

Bugs or feature requests

To inform us of any bugs or requests, please open a new issue or send an email to #jasmine.chong@mail.mcgill.ca.

MetaboAnalystR History & Updates

03-05-2019 - Version Update: 2.0.0! - added function for graphical integration of results from mummichog and fGSEA, added new tutorial with example data from the fecal metabolome of IBD patients

03-03-2019 - Version Update: 1.0.4 - added support for pathway activity prediction using fGSEA; major release coming soon after bug fixes

02-11-2019 - Version Update: 1.0.3 - updated underlying R code w. changes to MetaboAnalyst 4.53 + updated documentation

11-20-2018 - Version Update: 1.0.2 - updated links in R code (https) + underlying code w. changes to MetaboAnalyst 4.39

07-03-2018 - Addition of XCMS to MetaboAnalystR tutorial

06-25-2018 - Publication of MetaboAnalystR in Bioinformatics

06-13-2018 - Addition of case studies + unit-testing + 3D visualization with plotly

05-25-2018 - Version Update: 1.0.1 - updated underlying R code w. changes to MetaboAnalyst 4.09

04-20-2018 - Submission to CRAN

04-16-2018 - Testing with R Version 3.4.4

04-10-2018 - Updated underlying R code w. changes to MetaboAnalyst 4.0

03-23-2018 - Added 2 more package dependencies

02-23-2018 - Minor bug fixes based on user feedback (MetaboAnalystR_1.0.0.6.tar.gz)

02-05-2018 - Update MetaboAnalystR with 3 new modules in conjunction with the release of MetaboAnalyst Version 4

Copy Link

Version

Version

2.0.0

License

GPL-3

Maintainer

Jasmine Chong

Last Published

August 9th, 2021

Functions in MetaboAnalystR (2.0.0)

ANOVA2.Anal

Perform Two-way ANOVA
ASCAfun.res

Function to perform ASCA
ASCAfun1

Function to perform ASCA
GetAccuracyInfo

Export biomarker accuracy information
ANOVA.Anal

Perform ANOVA analysis
Convert2Mummichog

Convert mSetObj to proper format for MS Peaks to Pathways module
ComputeHighLow

Compute the 95 percent interval for threshold ROC
CreateANOVAdoc

Create report of analyses
CreateEnrichAnalDoc

Create report of analyses (Met Enrichment)
CreateCorrDoc

Create report of analyses
CreateAOV2doc

Create report of analyses
CreateEnrichInputDoc

Create report of analyses (Met Enrichment)
CreateKMdoc

Create report of analyses
CalculateImpVarCutoff

Perform OPLS-DA
CleanNumber

Replace infinite numbers
CreateLadder

R-code for R-SVM
ClearNegatives

Data processing: Dealing with negative values
CVTest.LRmodel

Calculate ROC performance with CV
CreateNetworkExplorerInputDoc

Create network explorer: Data Input
CleanData

Perform data cleaning
CreateMetaAnalysisOutput

Create MetaAnalysis analysis report: Data Normalization
CreateMetaAnalysisOverview

Create MetaAnalysis analysis report: Overview
CreateMummichogAnalTable

Create Mummichog report of analyses
CalculateOraScore

Calculate ORA score
CreateMummichogAnalysisDoc

Create mummichog analysis report
ClearStrings

Remove spaces
CreateOPLSDAdoc

Create report of analyses
CalculateFeatureRanking

Calculates feature importance
CreateGraph

Create igraph from the edgelist saved from graph DB and decompose into subnets
CleanDataMatrix

Clean the data matrix
CreatePCAdoc

Create report of analyses
ClearUserDir

Clear folder and memory
ComputeAverageCurve

Compute average ROC curve
CreatePathRnwReport

Create report of analyses (Met Pathway)
GetHTMLMetSet

Given a metset inx, return hmtl highlighted metset cmpds and references
CreateIntegratedPathwayAnalIntr

Create integrated pathway analysis report: Introduction
ASCAfun2

Function to perform ASCA
CreatePowerAnalDoc

Create power analysis report: Power Analysis
AddErrMsg

Adds an error message
PlotOPLS.Permutation

Perform OPLS-DA permutation
CreateASCAdoc

Create report of analyses
CreateBiomarkerRatioOverview

Create biomarker analysis report: Normalization, ratio
CreateHCdoc

Create report of analyses
GetAbundanceLabel

Determine value label for plotting
CreateBiomarkerRnwReport

Create report of analyses (Biomarker)
CreateSVMdoc

Create report of analyses
CreateSemiTransColors

Create semitransparant colors
Get.rpart.summary

Get the text description of a recursive partitioning (rpart) result
CreateStatIntr

Create report of analyses
CreateEBAMdoc

Create report of analyses
CalculateSSP

Single sample profiling to compare with
GetFinalNameMap

Return the final (after user selection) map as dataframe
FC.Anal.unpaired

Fold change analysis, unpaired
CheckMetaDataConsistency

Check if data are ready for meta-analysis
FeatureCorrelation

Pattern hunter
GetMsetLibCheckMsg

Get the library check messages
PlotAscaImpVar

Plot the important variables for each factor
CreateEnrichQEAdoc

Create report of analyses (Met Enrichment)
CreateEnrichRnwReport

Create report of analyses (Met Enrichment)
GetMetaSigHitsTable

Export the significant hits from meta-analysis
CreateUnivROCTable

Create summary table for univariate ROC analysis
CreateIntegratedPathwayAnalInputDoc

Create integrated pathway report: Data Input
GetCMD

Retrieve last command from the Rhistory.R file
CreateMappingResultTable

Creates the mapping result table
CreateBiomarkerIntr

Create biomarker analysis report: Introduction
CreateBiomarkerOverview

Create biomarker analysis report: Overview
GetImpFeatureMat

Get important feature matrix
CreateEnrichOverview

Create report of analyses (Met Enrichment)
CreateMummichogOverview

Create Mummichog analysis report: Overview
GetHTMLPathSet

Given a metset inx, return hmtl highlighted pathway cmpds
GetORATable

Get ORA table
PLSR.Anal

PLS analysis using oscorespls (Orthogonal scores algorithm) so that VIP can be calculated note: the VIP is calculated only after PLSDA-CV is performed to determine the best # of comp. used for VIP
CreateMetaAnalysisRnwReport

Create report of analyses (Meta-Analysis)
CreateEnrichProcessDoc

Create report of analyses (Met Enrichment)
CreateSummaryTable

Create report of analyses
GetRFSigMat

Random Forest Significance matrix
CreateNetworkExplorerOverview

Create network explorer report: Overview
CalculateGlobalTestScore

Quantitative enrichment analysis with globaltest
CreateRatioTable

Create report of analyses
CreateModelBiomarkersDoc

Create biomarker analysis report: ROC Curve Based Model Creation and Evaluation
GetROCTtestP

Get p-values for ROC
GetQEA.keggIDs

Only for human pathways (KEGG)
CreateMBdoc

Create report of analyses
GetSVMSigMat

Recursive Support Vector Machine (R-SVM) Significance Measure
GetVennGeneNames

Get Venn names
CreatePathProcessDoc

Create report of analyses (Met Pathway)
FisherLSD

Fisher for ANOVA
CreateMetaTable

Create MetaAnalysis table of results
CreatePathIntr

Create report of analyses (Met Pathway)
FormatPeakList

Format Peak List This function formats the CAMERA output to a usable format for MetaboAanlyst.
CreateEnrichSSPdoc

Create report of analyses (Met Enrichment)
GetSampleSizeLadder

Retrieve sample size ladder
CreateStatRnwReport

Create report for statistical analysis module
CreatePLSdoc

Create report of analyses
CalculateHyperScore

Over-representation analysis using hypergeometric tests
GetTrainTestSplitMat

Make random partitions
CalculatePairwiseDiff

Calculate Pairwise Differences
GetConvertFullPath

Perform utilities for cropping images
CreateNetworkExplorerIntr

Create integrated pathway analysis report: Introduction
CalculateQeaScore

Calculate quantitative enrichment score
GetSigTable.MB

Sig table for MB analysis
CreateNetworkExplorerRnwReport

Create report of analyses (Network Explorer)
GetSigTable.RF

Sig table for random forest analysis
GetTtestRes

Retrieve T-test p-values
CreateAnalNullMsg

Create null message for analysis Creates a message for the Sweave report
CreateMummichogIntro

Create mummichog analysis report: Introduction
KEGGID2Name

Given a vector containing KEGGIDs, returns a vector of KEGG compound names
CreateMultiBiomarkersDoc

Create biomarker analysis report: Multivariate Biomarker Analysis
CreateFooter

Create report of analyses (Met Enrichment)
CreateBiomarkerInputDoc

Create biomarker analysis report: Data Input
CreateEnrichIntr

Create report of analyses (Met Enrichment)
CreateEnrichORAdoc

Create report of analyses (Met Enrichment)
PCA.Anal

Perform PCA analysis
LogNorm

Column-wise Normalization
GroupPeakList

Group peak list
CreatePathResultDoc

Create report of analyses (Met Pathway)
CreateStatIOdoc

Create report of analyses
CreateMummichogRnwReport

Create report of analyses (Biomarker)
HMDBID2KEGGID

Given a vector of HMDBIDs, return a vector of KEGG IDs
CreateNetworkExplorerDoc

Create integrated pathway analysis report
Get.Leverage

Fast leverage calculation for permutation purpose
PlotRF.Classify

Plot Random Forest
GetRFOOB

Random Forest OOB
GetMeanROC

Compute data points on the ROC curve
CreateMummichogInputDoc

Create Mummichog analysis report: Data Input
GetSigTable.SVM

Sig table for SVM
CreateUNIVdoc

Create report of analyses
CreatePowerRnwReport

Create report of analyses (Power)
GetROCLassoFreq

Get p-values from lasso
CreatePathInputDoc

Create report of analyses (Met Pathway)
GetRFConfMat

Random Forest Confusion Matrix
PlotPCAScree

Plot PCA scree plot
CreateIntegratedPathwayDoc

Create integrated pathway analysis report
CreateROCLabelsTable

Create a x-table for newly classified samples
GetRCommandHistory

Export R Command History
GetSigTable

Create Latex table
CreateTimeSeriesRnwReport

Create report of analyses (Met Pathway)
KEGGPATHID2SMPDBIDs

Given a vector containing KEGG pathway IDs, return a vector containing SMPDB IDs (only for hsa)
PerformAdductMapping

Read Adduct List
PlotCorr

Pattern hunter, correlation plot
Get.ConcRef

Get the concentration reference
Plot.Permutation

Plot results of permutation tests
CreateNetworkNameMapTable

Create a x-table for compound name mapping
CreateNetworkGeneMapTable

Create a x-table for gene name mapping
MSspec.fillPeaks

Function to fill in missing peaks
Get.VIP

Calculate variable importance of projection (VIP) score for PLS object
PlotPLS.Classification

Plot PLS-DA classification performance using different components
CreateIntegratedPathwayGeneMapTable

Create a x-table for gene name mapping
PerformIntegGeneMapping

Perform integrated gene mapping
CreateNORMdoc

Create report of analyses
CreateMetaAnalysisDEdoc

Create MetaAnalysis analysis report: Data Normalization
CreateMetaAnalysisIntr

Create MetaAnalysis analysis report: Introduction
GetCIs

Get confidence intervals
CreateHeatmap2doc

Create report of analyses
FilterVariable

Methods for non-specific filtering of variables
CreateMetaAnalysisInputDoc

Create MetaAnalysis analysis report: Data Input
LoadMsetLib

Load metabolite set library
GetAllKMClusterMembers

K-means analysis - cluster
CreateIntegPathwayAnalysisRnwReport

Create report of analyses (IntegPathwayAnalysis)
CreateRFdoc

Create report of analyses
CreateTimeSeriesIOdoc

Create report of analyses (Met Pathway)
GetMaxPCAComp

For plotting PCA, selects max top 9 components
Perform.ASCA

Perform ASCA
PerformPeakProfiling

Perform peak annotation This function performs feature extraction of user's raw MS data using the rawData object created using the InspectRawMSData function.
LoadKEGGLib

Load KEGG library
CreatePowerOverview

Create power analysis report: Overview
GetMetSetName

Given a metset inx, give its name
GetRFConf.Table

Classification performance table for random forest analysis
CreateSAMdoc

Create report of analyses
PerformMetaMerge

Meta-Analysis Method: Direct merging of datasets
CreateiPCAdoc

Create report of analyses
LoadKEGGKO_lib

Utility function for PerformKOEnrichAnalysis_KO01100
Normalization

Normalization
IsSmallSmplSize

Check if the sample size is small
GetSigTable.SAM

Sig table for SAM
CreatePowerInputDoc

Create power analysis report: Data Input
PerformApproxMatch

Perform approximate compound matches
CreatePowerIntr

Create power analysis report: Introduction
PlotPCA3DScore

Create 3D PCA score plot
CreateUnivarBiomarkersDoc

Create power analysis report: Biomarker Univariate Analysis
GetSOMClusterMembers

SOM analysis
GetAllSOMClusterMembers

SOM analysis
CreatePathAnalDoc

Create report of analyses (Met Pathway)
PlotMBTimeProfile

Plot MB Time Profile
GetSigTable.TT

Sig Table for T-test Analysis
GetAllDataNames

Get all meta-analysis name data
Read.PeakListData

Constructor to read uploaded user files into the mummichog object
PlotKEGGPath

Plot metabolome pathway
MetaboliteMappingExact

Mapping from different metabolite IDs
ImputeVar

Data processing: Replace missing variables
IsSpectraProcessingOK

Check if the spectra processing is ok
PerformIntegPathwayAnalysis

Perform integrative pathway analysis
PerformPowerProfiling

Perform power profiling
Get.pred

Get predicted class probability
PerformIndNormalization

Perform normalization for individually-uploaded datasets for meta-analysis
InitPowerAnal

Function for power analysis
SetupKEGGLinks

Only works for human (hsa.rda) data
SearchNetDB

Perform mapping of user's data to interaction network
GetCircleInfo

Export information about selected circle
GetExtendRange

Extend axis
CreateTimeSeriesAnalNullMsg

Create null analysis message for time-series sweave report
GetFisherPvalue

Get fisher p-values
CreateRHistAppendix

Create report of analyses
CreateSPLSDAdoc

Create report of analyses
GetKEGGNodeInfo

Retrieves KEGG node information
aov.repeated

Perform Two-way ANOVA
Get.pAUC

Calculate partial area under ROC curve
FC.Anal.paired

Fold change analysis, paired
GetSigTable.ASCA

Table of features well modelled by ASCA
InitStatAnalMode

Introduction for statistical analysis module report Initialize Statistical Analysis Report
GetTTSigMat

T-test matrix
GetQEATable

QEA table
GetSigTable.FC

Sig Table for Fold-Change Analysis
CreateIntegratedPathwayNameMapTable

Create a x-table for compound name mapping
GetQEA.pathNames

Export pathway names from QEA analysis
SanityCheckIndData

Sanity check of individual datasets for meta-analysis
GetNewSampleNames

Obtain sample names and their class labels
CreateMetaAnalysisNORMdoc

Create MetaAnalysis analysis report: Data Normalization
GetSSPTable

Replace the last column of the ssp.mat with the final selection from users
PlotCmpdSummary

Plot compound summary change to use dataSet$proc instead of dataSet$orig in case of too many NAs
GetNetworkGeneMappingResultTable

Exports Gene-Mapping result into a table
PlotInteraction

Plot ASCA interaction plots
PlotCorrHeatMap

Pattern hunter, corr heatmap
EBAM.Cmpd.Init

For EBAM analysis
PlotAccuracy

Plot classification performance using different features for Multi-Biomarker
PreparePDFReport

Create report of analyses
PreparePermResult

Prepare report for permutation tests
PlotMS.RT

Plot rentention time corrected spectra
GetTopInx

Volcano indices
PlotSPLS2DScore

Score Plot SPLS-DA
PlotPCAPairSummary

Plot PCA pair summary, format image in png, tiff, pdf, ps, svg
GetCandidateList

Get all candidate compound names for a given index
PlotPLS3DScoreImg

Plot PLS 3D score plot
GetXYCluster

Determine row/column number for plotting
Match.Pattern

Match pattern for correlation analysis
CreateIntegratedPathwayResultsTable

Create a x-table for pathway results
aov.within

Perform Two-way ANOVA
GetSigTable.Anova

Sig Table for Anova
RSVM

R-SVM core code
GetSigTable.Volcano

Sig table for Volcano Analysis
Predict.class

Get predicted class probability
PlotPLS.Imp

Plot PLS important features
RSVM.Anal

Recursive Support Vector Machine (R-SVM)
CrossReferencing

Various functions for mapping b/w names & database identifiers Given a list of compound names or ids, find matched name or ids from selected databases
MapKO2KEGGEdges

Utility function for PrepareQueryJson
PlotConcRange

Plot the compound concentration data compared to the reference concentration range
PlotRF.Outlier

Plot Random Forest outliers
CreateVennMetaTable

Create MetaAnalysis table of results for Venn Diagram
PlotSOM

SOM Plot
GetMapTable

Get mapping table
GetSelectedDataNumber

Retrieve selected data numbers
GetLimmaResTable

Get result table from eBayes fit object
KEGGID2HMDBID

Given a vector of KEGGIDs, return a vector of HMDB ID
MergeDuplicates

Merge duplicated columns or rows by their mean
InitTimeSeriesAnal

Create report of analyses (Met Pathway)
RemoveCmpd

Remove selected compounds
PrepareNetworkData

Prepare data for network exploration
PlotHeatMap

Create Heat Map Plot
PerformDetailMatch

Perform detailed name match
PerformBatchCorrection

Set up two matrixes
GetKMClusterMembers

K-means analysis - cluster
CreatePowerParametersDoc

Create power analysis report: Power Parameter Selection
PerformMapping

Utility function for PrepareQueryJson geneIDs is text one string, need to make to vector
SetSAMSigMat

Set Signifiance Analysis of Microarrays (SAM) analysis matrix
PerformCV.test

Perform MCCV for manually selected features
CreateSOMdoc

Create report of analyses
RemoveData

Remove data object, the current dataSet will be the last one by default
SetPeakParam

Set parameters for peak picking using XCMS and CAMERA
PCA.Flip

Rotate PCA analysis
PlotSAM.FDR

Plot SAM Delta Plot
PlotEBAM.A0

For EBAM analysis
Setup.BiofluidType

Save biofluid type for SSP
Perform.UnivROC

Perform Classical Univariate ROC
PerformEachDEAnal

Performs differential expression analysis on individual data
GetROC.coords

Return ROC corodinates with confidence intervals
GetMsetLibSearchResult

Return metset search results
PlotImpVars

Plot selected compounds by their percentage frequency
PlotIntegPaths

PlotIntegPaths
EBAM.A0.Init

For EBAM analysis
Get.asca.tss

Function for ASCA permutation
SearchMsetLibraries

Search metabolite set libraries
LoadSmpLib

Load pathway library
Setup.ConcData

Save concentration data
map

sPLS-DA Map
SetAnnotationParam

Set annotation parameters
PCA.GENES

Obtain principal components into a matrix that has more variables than individuals
PerformIntegCmpdMapping

Perform compound mapping for integrative analysis methods
GetSigTable.EBAM

Sig table for EBAM
GetMetaResultMatrix

Single.type return logFC or p value for individual data analysis
PerformMultiMatch

Perform multiple name matches
Get.bwss

Compute within group and between group sum of squares (BSS/WSS) for each row of a matrix which may have NA
SOM.Anal

SOM analysis
PlotSPLS3DScore

3D SPLS-DA score plot
MapCmpd2KEGGNodes

Utility function for PrepareQueryJson
PlotCmpdView

Plot Compound View
SetCurrentGroups

To choose from two groups
PlotLoadingCmpd

Plot loading compounds
Perform.permutation

Permutation
ROCPredSamplesTable

Create a table of newly classified samples
XSet2MSet

Converts xset object from XCMS to mSet object for MetaboAnalyst
OPLSR.Anal

Perform OPLS-DA
GetORA.pathNames

Export pathway names from ORA analysis
PerformLimmaDE

Perform differential expression analysis using Limma for individually-uploaded data.
GetFC

Used by higher functions to calculate fold change
PlotHCTree

Plot Dendrogram
GetUnivReport

Utility method to perform the univariate analysis automatically
PlotHeatMap2

Plot heatmap visualization for time-series data
PlotSAM.Cmpd

Plot SAM
PlotMSEA.Overview

Plot MSEA overview
MSspec.rtCorrection

Retention time correction for LC/GC-MS spectra
PlotKmeans

Plot K-means analysis
GetFeatureNumbers

Numbers for subset selection
GetSigTable.Aov2

Sig table for AOV2
GetLassoFreqs

Compute lasso frequency
LSD.test

Calculate Fisher's Least Significant Difference (LSD)
PlotSelectedFeature

Create a box-plot of a feature's expression pattern across the different datasets
PlotANOVA2

Plot Venn diagram of ANOVA results
GetSelectedDataNames

Retrieve data names
PerformVoteCounting

Meta-Analysis Method: Vote Counting
PlotRF.VIP

Plot Random Forest variable importance
HMDBID2Name

Given a vector of HMDBIDs, return a vector of HMDB compound names
PlotANOVA

Plot ANOVA
PlotQEA.MetSet

View individual compounds related to a given metabolite set
GetMsetNames

Return the selected metset library to java for display
PLSDA.CV

PLS-DA classification and feature selection
PlotRSVM.Classification

Recursive Support Vector Machine (R-SVM) plot
PlotASCAModel

Plot score plots of each ASCA model for component 1 against time
PlotEnrichNet.Overview

Barplot height is enrichment fold change
PlotOPLS.Splot

S-plot for OPLS-DA
GetSuggestedSAMDelta

For SAM analysis
doCompoundMapping

Perform compound mapping
PerformCV.explore

Perform Monte-Carlo Cross Validation (MCCV)
GetORA.smpdbIDs

Only for human pathways (SMPDB)
PlotDetailROC

Plot detailed ROC
PerformCurrencyMapping

Map currency metabolites to KEGG & BioCyc
analyze.lipids

Lipid analysis pipeliner
multi.stat

Get multiple category statistics
Perform.Permut

Perform permutation tests only for ROC Tester
SetupMSdataMatrix

Create a MS spectra data matrix of peak values for each group
PerformPvalCombination

Meta-Analysis Method: Combining p-values
rectUnique

Perform utilities for peak grouping
sparse.mint.block_iteration

Perform Sparse Generalized Canonical Correlation (sgccak)
ImportRawMSData

Import raw MS data
PLSDA.Permut

Perform PLS-DA permutation
PerformMummichog

Main function to perform mummichog
PlotASCA.Permutation

Plot ASCA permutation
GetSigTable.Corr

Sig table for Correlation Analysis
PerformKOEnrichAnalysis_KO01100

Performs KO enrichment analysis based on the KO01100 map
Perform.ASCA.permute

Perform ASCA model validation by permutation
Read.BatchCSVdata

Data I/O for batch effect checking
heckbert

Heckbert algorithm
PerformKOEnrichAnalysis_List

Utility function for PerformKOEnrichAnalysis_KO01100
PlotTestAccuracy

Plot classification performance using different features for Biomarker Tester
.read.metaboanalyst.lib

Read RDS files from the internet
PlotNormSummary

Two plot summary plot: Feature View of before and after normalization
PlotPLSLoading

Plot PLS loading plot, also set the loading matrix for display
GetVariableLabel

Determine variable label for plotting
PerformPeakAnnotation

Perform peak annotation This function performs peak annotation on the xset object created using the PerformPeakPicking function.
PlotROC.LRmodel

Plot ROC for the logistic regression model
PlotPCA.overview

Scatter plot colored by different batches
MergeDatasets

Utility function for PrepareQueryJson
RF.Anal

Perform Random Forest Analysis
PlotSPLSPairSummary

Plot SPLS-DA
InitDataObjects

Constructs a dataSet object for storing data
PlotPathSummary

Plot a scatterplot (circle) overview of the matched pathways
PlotPCABiplot

Create PCA Biplot, set xpd = T to plot outside margin
Kmeans.Anal

K-means analysis
PlotInmexPath

Plot integrated methods pathway analysis
PlotPowerStat

Plot power statistics
PlotPCA2DScore

Create 2D PCA score plot
PlotPowerProfile

Plot power profile
PlotModelScree

Plot scree plots for each model in ASCA
RemoveFolder

Remove folder
PlotRSVM.Cmpd

Recursive Support Vector Machine (R-SVM) plot of important variables
PerformGSEA

New main function to perform fast pre-ranked mummichog
SearchByName

Given a metabolite set name, search its index
PlotEIC

Plot EIC This functionn creates an extracted ion chromatogram (EIC) for a specific m/z and retention time. This is used for quality-control of raw m/s data.
ReadIndData

Read in individual data
PlotEBAM.Cmpd

Plot EBAM
PlotVolcano

Create volcano plot
PlotTT

Plot t-test
PerformGeneAnnotation

Perform gene annotation
PlotInmexGraph

Plot an igraph object and return the node information (position and labels)
RerenderMetPAGraph

Redraw current graph for zooming or clipping then return a value
ReadPairFile

Read paired peak or spectra files
PlotOPLS2DScore

Create OPLS-DA score plot
UpdateIntegPathwayAnalysis

Update integrative pathway analysis for new input list
PlotImpVar

Plot PLS important variables,
usr2png

Perform utilities for MetPa
PrepareQueryJson

Prepare user's query for mapping KEGG Global Metabolic Network
PlotMetaVenn

Meta-Analysis: Plot Venn Diagram
PlotPCA3DScoreImg

Create 3D PCA score plot
PreparePrenormData

Prepare data for normalization
PlotPCALoading

Plot PCA loadings and also set up the matrix for display
RemoveGene

Remove selected genes
PlotOPLS.MDL

Plot OPLS
PlotMetpaPath

Plot KEGG pathway
SetCachexiaSetUsed

Set the cachexia set used
RecordRCommand

Record R Commands
PlotPLSPairSummary

Plot PLS pairwise summary
RegisterData

Register data in R
SAM.Anal

Perform Signifiance Analysis of Microarrays (SAM) analysis
PlotQEA.Overview

Plot QEA overview
PlotSPLS3DScoreImg

Plot sPLS-DA 3D score plot
SanityCheckData

Sanity Check Data
PrepareIntegData

Prepare integrated data
PlotPLS3DScore

Plot PLS 3D score plot
PlotORA

Plot over-representation analysis (ORA)
doGeneIDMapping

Perform various annotation
SetCandidate

Set matched name based on user selection from all potential hits
doEmblProtein2EntrezMapping

Utility function for PerformNetEnrichment
isEmptyMatrix

Sig table matrix is empty
SetSMPDB.PathLib

Set SMPDB pathway library
PlotFC

Plot fold change
Setup.AdductData

Save adduct names for mapping
doKEGG2NameMapping

Perform KEGG to compound name mapping
PlotPLS.Permutation

Plot PLS-DA classification performance using different components, permutation
PlotSPLSLoading

Create SPLS-DA loading plot
UpdateOPLS.Splot

Update OPLS loadings
SaveTransformedData

Save the processed data with class names
Volcano.Anal

Perform Volcano Analysis
PrepareVennData

Prepare data for Venn diagram
doKOFiltering

Utility function
PlotSampleNormSummary

Two plot summary plot: Sample View of before and after normalization
RankFeatures

Rank features based on different importance measures
UpdateMummichogParameters

Update the mSetObj with user-selected parameters for MS Peaks to Pathways.
parseFisher

Return only the signicant comparison names
SetMetabolomeFilter

Set metabolome filter
Ttests.Anal

Perform t-test analysis
PlotROC

Plot ROC
Read.MSspec

Read LC/GC-MS spectra (.netCDF, .mzXML, mzData)
PlotProbView

Plot a summary view of the classification result
parseTukey

Return only the signicant comparison names
PlotSigVar

Supporting function for plotting important variables for each factor
SearchByCompound

Search for compound from all member compounds of metabolite set
PlotSPLSDA.Classification

Create SPLS-DA classification plot
SetEBAMSigMat

For EBAM analysis
aof

ANOVA
PlotPLS2DScore

Plot PLS score plot
PlotROCTest

Plot ROC for the ROC Curve Based Model Creation and Evaluation module
PrepareROCDetails

ROC with CI for AUC
Setup.HMDBReferenceMetabolome

Read user uploaded metabolome as a list of HMDB compound names
PlotSubHeatMap

Create Sub Heat Map Plot
SetPeakList.GroupValues

Set peak list group values
SanityCheckMummichogData

Sanity Check Data
Read.PeakList

Read peak list files
getDataFromTextArea

Transform two column text to data matrix
splsda

Perform sPLS-DA
RemoveMissingPercent

Data processing: remove variables with missing values
PrepareROCData

Prepare data for ROC analysis
RemoveFile

Remove file
Read.TextData

Constructor to read uploaded CSV or TXT files into the dataSet object
SetDesignType

For two factor time series only
computeConc

Lipid analysis
SetCustomData

Set custom data
RemoveDuplicates

Given a data with duplicates, remove duplicates
SetCurrentMsetLib

Set current user selected metset library for search
SetKEGG.PathLib

Set KEGG pathway library
SelectMultiData

Select one or more datasets for meta-analysis
Setup.KEGGReferenceMetabolome

Read user uploaded metabolome as a list of KEGG pathway ids
UpdatePCA.Loading

Update PCA loadings
Setup.MapData

Save compound name for mapping
ReplaceMin

Replace missing or zero values
SetAnalysisMode

Set biomarker analysis mode
make_cpdlist

Utility function to create compound lists for permutation analysis
aov.between

Perform Two-way ANOVA
Setup.UserMsetLibData

Read user upload metabolite set library file
UnzipUploadedFile

Unzip .zip files
calculateConcISO

Calculate Concentration ISO
plotProfile

Plot the variable across time points (x)
performMB

Timecourse analysis
findEqualGreaterM

Perform utilities for peak grouping
kwtest

Kruskal-Wallis
.readDataTable

Read data table
fgsea2

Pre-ranked gsea adapted for untargeted metabolomics
genLogisticRegMdl

Develop a Logistic Regression Model with all of the combined k-fold CV subsets
SetOrganism

Set organism for further analysis
UpdatePLS.Loading

Update PLS loadings
SPLSR.Anal

Perform SPLS-DA
template.match

Pattern hunter
SetupSMPDBLinks

Only works for human (hsa.rda) data
SumNorm

Row-wise Normalization
createCVset

Separate data set using k-fold cross validation (CV)
descendMin

Perform utilities for peak grouping
iPCA.Anal

Perform PCA analysis, prepare file for interactive liveGraphics3D