Skip to content

5. Local installation

kelwyres edited this page Feb 7, 2021 · 6 revisions

Kleborate-viz is an R Shiny app and we recommend using the live version, which can be found here. Alternatively, Kleborate-viz can be installed and run locally using the instructions below.

Dependencies

  • R v4.0.3+ and the following R packages:
    • heatmaply v1.1.1+
    • plotly v4.9.2.1+
    • reshape2 v1.4.4+
    • shiny v1.5.0+
    • shinybs v0.61+
    • shinyjs v2.0.0+
    • tidyverse v1.3.0+
    • vegan v2.5-6+
  • And the following for PDF plot downloads (optional):

Conda

The fastest and easiest way to get Kleborate-viz running on your computer is to use conda:

# Create and activate a conda environment containing all dependencies
conda create \
  -p $(pwd -P)/conda_env/ \
  -c conda-forge \
  -c bioconda \
  -c plotly \
  -y \
  phantomjs \
  plotly-orca \
  r-base \
  r-heatmaply \
  r-plotly \
  r-reshape2 \
  r-shiny \
  r-shinybs \
  r-shinyjs \
  r-tidyverse \
  r-vegan
conda activate conda_env/

# Download Kleborate-viz and launch the server
git clone https://github.com/kelwyres/Kleborate-viz.git && cd Kleborate-viz
R -e "shiny::runApp('.')"

Once the server has been launched it will be served on a random port (the exact port will be displayed in your terminal). To connect to Kleborate-viz, navigate your browser to the displayed address and port (e.g. http://127.0.0.1:4621).

Orca on a headless Linux server

There are additional requirements for orca to run on headless Linux servers. Please see here for further details. Below is a working deploy for Ubuntu Bionic LTS:

# Install dependencies
apt-get update -y
apt-get install -y \
  libudunits2-dev \
  libproj-dev \
  libgeos-dev \
  libgdal-dev \
  libgtk2.0-0 \
  libgconf-2-4 \
  xvfb \
  fuse \
  desktop-file-utils

# Install chrome and be sure we've satisfied dependencies (recommended by orca devs)
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
apt-get install -y google-chrome-stable

# Install orca
wget -P /usr/local/bin/ https://github.com/plotly/orca/releases/download/v1.3.1/orca-1.3.1.AppImage
echo -e "#!/bin/bash\nxvfb-run -a orca-1.3.1.AppImage "$@"" > /usr/local/bin/orca
chmod 755 /usr/local/bin/orca-1.3.1.AppImage /usr/local/bin/orca
Clone this wiki locally