Download and Run
Download the Source
You can download the source from GitHub, using this link or cloning the repository with the following command in your terminal. This requires git installed on your machine.
git clone https://github.com/danilexn/chromo cd chromo
From R or RStudio
The following must be installed in your local machine:
- R (we recommend using RStudio). You can find installation instructions for RStudio here
- libglpk-dev (for Linux; you will be asked for root password)
sudo apt-get update -y; sudo apt-get install -y libglpk-dev
More specifically, ChroMo depends on some R packages that must be previously installed. To make sure everything is ready, you can run the following command (inside a R console or in RStudio):
chromo.packages <- c("shiny", "shinycssloaders", "promises", "future", "ipc", "forecast", "dplyr", "ggplot2", "dplR", "lmtest", "purrr", "tidyr", "reshape2", "tseries", "segclust2d", "segmenTier", "mclust", "lattice", "TTR", "egg", "readxl", "RCurl", "shinythemes", "ggpubr", "htmlwidgets", "plotly", "rapportools", "tie", "pcalg", "VLTimeCausality", "network", "sna", "networkD3", "igraph", "GGally", "PerformanceAnalytics") install.packages(chromo.packages)
Once all packages have been installed, you can run ChroMo on R, with the following command on your terminal:
cd chromo/app # if not in ChroMo directory Rscript app.R
You will be displayed something like this
2 files sourced from folder "plots" 5 files sourced from folder "analysis" 3 files sourced from folder "calculators" Listening on http://127.0.0.1:5170
This means that you can open a browser, and navigate to http://127.0.0.1:5170 to open the local instance of ChroMo.
Alternativelly, you can open the file
app.R inside the
chromo/app directory using RStudio, and click on
Run App. This button is located on the upper-right corner of the source code layout.
You will need the following:
- Docker. Please, find here the install instructions
Optionally, you can also use:
- ShinyProxy, if you are going to deploy a multi-user instance on your own server. Please, find here the install instructions
Run with Docker only
First, you will need to download the Docker image
docker pull docker.pkg.github.com/danilexn/chromo/chromo:latest
Then, you can change the name of the image to something more descriptive
docker tag docker.pkg.github.com/danilexn/chromo/chromo chromo-local
You will need to create a
bookmarks directory to enable local storage of analyses with the bookmarking functionality. For example:
mkdir /home/<user>/bookmarks chmod -R 0777 /home/<user>/bookmarks
<user> with your username. Also, you can specify a different directory; be aware that you will need to change the corresponding argument to chmod (above).
Finally, you can run ChroMo with Docker
docker run -v /home/<user>/bookmarks:/home/chromo/app/shiny_bookmarks -p 3838:3838 chromo-local
<user> with your username, or the whole first path by the actual route of the local
bookmarks directory. Moreover, you can change any of the settings in the command above, e.g., regarding ports or memory and CPU allocation. Check Docker's official reference guide for more information.
You can now open localhost:3838 on your favourite web browser, and start using ChroMo.
ShinyProxy will allow to run multiple instances of ChroMo on the same server, by taking advantage of containerization through Docker. We provide our own configuration profiles on ChroMo's main GitHub repository. Please, find here the whole reference guide to ShinyProxy for more advanced configuration settings.
- First, you will need to download the Docker image following the steps above.
- Clone ChroMo's repo using the steps above.
- Copy ShinyProxy's executable and configuration files into the corresponding local directory
cp net/shinyproxy/shinyproxy.jar /opt/shinyproxy/shinyproxy.jar cp net/shinyproxy/application.yml /etc/shinyproxy/application.yml
- Our configuration file,
application.yml, will make ShinyProxy expect three types of instance (ChroMo S, M and L). You can either change this configuration file with your own image names, or create the three expected images:
docker tag docker.pkg.github.com/danilexn/chromo/chromo danilexn/chromo-s:latest docker tag docker.pkg.github.com/danilexn/chromo/chromo danilexn/chromo-m:latest docker tag docker.pkg.github.com/danilexn/chromo/chromo danilexn/chromo-l:latest
- Restart ShinyProxy, making sure that all Docker containers have been stopped. Otherwise, there may be conflicts creating new containers after the restart.
sudo service shinyproxy stop docker stop $(docker ps -q) sudo service shinyproxy start
The ShinyProxy server should be reachable at localhost:8080 on a web browser.