Metabolomics Personalized Pathway Analysis Tool

A comprehensive analysis tool for metabolomics data. It consists a variety of functional modules, including several new modules: a pre-processing module for normalization and imputation, an exploratory data analysis module for dimension reduction and source of variation analysis, a classification module with the new deep-learning method and other machine-learning methods, a prognosis module with cox-PH and neural-network based Cox-nnet methods, and pathway analysis module to visualize the pathway and interpret metabolite-pathway relationships. References: H. Paul Benton <> Jeff Xia <> Travers Ching, Xun Zhu, Lana X. Garmire (2018) .

Lilikoi computes the pathway deregulation score for a given set of metabolites, selects the pathways with the highest mutual information and then uses them to build a classifier.

"Lilikoi: an R package for personalized pathway-based classification modeling using metabolomics data. F. Alakwaa, S. Huang, and L. Garmire (2018) \doi{10.1101/283408}."



# Or for the latest dev version:


# library(lilikoi)

filename <- system.file("extdata", "plasma_breast_cancer.csv", package = "lilikoi")
metaboliteMeasurements <- read.csv(file = filename, check.names = FALSE, row.names = 1)
metaboliteNames <- colnames(metaboliteMeasurements)[-1]
clinicalFactorsData <- read.csv(file = system.file("extdata", "plasma_breast_cancer_Meta.csv",
  package = "lilikoi"))

# The below lines shrink the dataset for faster test runs. Remove them to operate on
# full dataset
metaboliteMeasurements <- metaboliteMeasurements[, 1:20]
metaboliteNames <- colnames(metaboliteMeasurements)[-1]

metabolitePathwayTable <- lilikoi.metab_to_pathway(metaboliteNames, "name")

# We use a subset of the database to speed up tests.
# Swap the comments on the below two lines to run on the full database.
# PDSmatrix <- lilikoi.get_pd_scores(metaboliteMeasurements, metabolitePathwayTable)
PDSmatrix <- lilikoi.get_pd_scores(metaboliteMeasurements, metabolitePathwayTable,

significantPathways <- lilikoi.select_pathways(PDSmatrix, metaboliteMeasurements,
  threshold = 0.42, method = "gain")

mlResults <- lilikoi.machine_learning(PDSmatrix, metaboliteMeasurements$Label,

finalModel <- lilikoi.adjust_model(mlResults$mlResults, PDSmatrix, significantPathways,
  metaboliteMeasurements, clinicalFactorsData, factors = c("Age", "Race"))

Updating the External Databases

Lilikoi depends on data from HMDB, SMPDB, and MetaboAnalyst. This library ships with the latest data as of the date of publication. To update to the latest data from these sources, load and run the lilikoi.update_database() method found in the lilikoi.update_database.r file.

Warning: the datasets are large (>5GB) and this step may take greater than 20 minutes.

Built By

More Examples



  • first release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0.4 by Lana Garmire, a year ago

Browse source code at

Authors: Xinying Fang [aut] , Yu Liu [aut] , Zhijie Ren [aut] , Fadhl Alakwaa [aut] , Sijia Huang [aut] , Lana Garmire [aut, cre]

Documentation:   PDF Manual  

GPL-2 license

Imports car, caret, dplyr, gbm, ggplot2, glmnet, h2o, impute, infotheo, limma, M3C, Metrics, MLmetrics, parallel, pathifier, pathview, plyr, preprocessCore, pROC, RCy3, reticulate, reshape, RWeka, scales, stats, stringr, survminer, survival

Suggests knitr, rmarkdown

See at CRAN