If you want to use anexVis, a web service is provided at https://anexvis.chpc.utah.edu
If you want to provide your own host, contribute to the code, or adopt it for your research, it is recommended to set it up on a server with Ubuntu 16.04 or higher.
This repo provides an installation script example that can be used to set up your own instance of anexVis web application. The application involves several components that need to be stitched together. In principle, the server components can be implemented separately. The example below only shows how to implement them in one single machine.
The application makes use of OpenCPU server runs on Ubuntu 16.04 or higher. Please make sure you have the appropriate OS before moving forward.
The data is stored in an HDF5 file which will be read to redis server (thus stay in memory for the whole time the application is running).
Make sure you transfer this file to some place on the server. We recorded the path to this data file in DATAPATH
DATAPATH='/the/path/to/your/data/GTEx_V6-public.h5'
program_dir=$HOME"/Programs"
mkdir -p $program_dir
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:opencpu/opencpu-1.6
sudo apt-get update
You may want to revise the mirror link depending on your location and your Ubuntu version.
sudo add-apt-repository -y "deb [arch=amd64] https://cran.cnr.berkeley.edu/bin/linux/ubuntu xenial/"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install -y r-base
Install using package manager
sudo apt-get install opencpu
Start it
sudo service opencpu start
And make sure it works
curl http://localhost/ocpu/info
Download, extract, compile and install
cd $program_dir
wget http://download.redis.io/releases/redis-3.2.8.tar.gz
tar -xzf redis-3.2.8.tar.gz
cd redis-3.2.8/
make
sudo make install
sudo apt-get install git
sudo Rscript -e "install.packages(c('futile.logger','testthat', 'roxygen2'), repos='https://cran.cnr.berkeley.edu/',Ncpus=2)"
sudo Rscript -e "devtools::install_version('devtools', version='1.11.1', repos='https://cran.cnr.berkeley.edu/',Ncpus=2,quiet=TRUE)"
sudo Rscript -e 'source("https://bioconductor.org/biocLite.R");biocLite("rhdf5");'
cd $program_dir
git clone https://github.com/anexVis/rvislib.git
cd rvislib
sudo Rscript -e "devtools::install('.')"
At the time of this writing, rredis on CRAN has an unfixed bug which we don't want. The code below will install rredis from github.
sudo Rscript -e 'devtools::install_github("bwlewis/rredis"); devtools::install_dev_deps(".")'
redis-server &
disown
As ranexvis
depends on all the components above, make sure OpenCPU and redis-server are started, and your data file is in place.
cd $program_dir
git clone https://github.com/anexVis/ranexvis.git
Replace the custom data path and install the package
Rscript -e `printf 'load("data/sysdata.rda");dbpath=list(gtex="%s");save(list=ls(),file="data/sysdata.rda")' $DATAPATH`
sudo Rscript -e "devtools::install('.', quick=TRUE, force_deps=FALSE, upgrade_dependencies=FALSE)"
Add ranexvis
to the list of packages to pre-load by OpenCPU server. You can also do this manually by modifying the line preload
in /etc/opencpu/server.conf
sudo sed -i '/preload/ c\ "preload": ["ranexvis", "ggplot2"]' /etc/opencpu/server.conf
Restart OpenCPU
sudo service opencpu restart
From the time OpenCPU server is up, it generally takes about 30 seconds to finish loading the whole data set. Until then, the gene list and other inputs won't be available.
cd $program_dir
git clone https://github.com/anexVis/anexvis-app.git
sudo mv anexvis-app /var/www/html/
The app is accessible at http://url-to-your-apache-server/anexvis-app