This R package is a wrap up of a shiny app for Metabolomics data analysis. This app was built on top of the Metabase package, with a GUI interface provided by the shiny framework. It provides some fundamental types of analysis, including univariate analysis (linear model), principle component analysis (PCA), clustered heatmap, and partial correlation network analysis.
There are quite a few packages that ShinyMetabase depends on. Please make sure all dependency packages were installed in your R environment. Using the command provided below to find out which packages are not installed.
pkgs = c(
"shiny", "shinydashboard", "dplyr", "reshape2", "glue", "ggplot2",
"R6", "DT", "shinyPagerUI", "shinyjs", "plotly", "heatmaply", "shinyjqui",
"space", "Metabase", "ggmetaplots"
)
for(pkg in pkgs){
if(!suppressPackageStartupMessages(require(pkg, character.only = TRUE))){
print(paste0("Package not installed: ", pkg))
}
}
All packages can be installed from CRAN using the install.packages()
function, except the Metabase, ggmetaplots and shinyPagerUI must be installed from github:
devtools::install_github("zhuchcn/Metabase")
devtools::install_github("zhuchcn/ggmetaplots")
devtools::install_github('wleepang/shiny-pager-ui')
When all dependency packages are installed, the package can be installed from github.
devtools::install_github("zhuchcn/ShinyMetabase")
There are two entry points of this app. Users can either directly parse data to the launcher, or upload .csv
files after the app is lunched.
The data to be parsed to the launcher must inherits from the mSet class from the Metabase package.
data = Metabase::lipid
ShinyMetabase::launch(data)
Users can also upload three separated '.csv' files after the app is launched. The three files:
Examples of the three .csv
files can be found in this repository in inst/shiny-metabase/data/
or from the package:
list.files(system.file("shiny-metabase/data/", package="ShinyMetabase"), pattern = ".csv")
To launch the app without parsing any data, just simply run:
ShinyMetabase::launch()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.