Installation - HelikarLab/StatisticalPlatform GitHub Wiki

To the best of my knowledge, this will be the only page you'd ever require to install Statistical Platform right from scratch. This script also believes to be a foolproof setup to have Statistical Platform onto your system. In case if you run into some problems, feel free to raise an issue.

These steps have been tested on Ubuntu 16.04

Make sure you have python 3 installed on your system before proceeding. Open a terminal on your system and follow these steps

If you have curl, R, Nodejs > 8.0, npm > 5.0 , pip and virtualenv already installed on your computer feel free to skip these steps.

  • Install R
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
$ sudo add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/'
$ sudo apt-get update
$ sudo apt-get install r-base
  • Install curl
$ sudo apt-get install curl
  • Install Nodejs and npm
$ curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
$ sudo bash nodesource_setup.sh
$ sudo apt-get install nodejs
  • Install pip
$ sudo apt-get install python3-pip
  • Install virtualenv
$ sudo pip3 install virtualenv 

Installing R packages

  • We'll install packages from the interactive shell, but before we do, we'll need to install these system dependencies:
$ sudo apt-get install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev libapparmor-dev libprotobuf-dev protobuf-compiler

  • Start R interactive shell:
$ sudo -i R
  • Install devtools package
> install.packages("devtools")
  • Install jsonlite package
> install.packages("jsonlite")
  • Install fpc package
> install.packages("fpc")
  • Install factoextra package [Note: This will take time ]
> install.packages("factoextra")
  • Install mclust package
> install.packages("mclust")
  • Install ggfortify package
> install.packages("ggfortify")
  • Install e1071 package
> install.packages("e1071")
  • Install opencpu package
> install.packages("opencpu")
  • Initiate opencpu
> library(opencpu)
  • install opencpu app
> opencpu::install_apps("tejasavkhattar/testpackage")

Now clone git repository on Desktop

$ git clone https://github.com/tejasavkhattar/StatisticalPlatform.git

Move to develop branch

$ git checkout develop

Creating a python virtual environment for this specific project and installing django dependencies.

  • Navigate to Desktop and create a virtual environment(StatisticalEnv is the name of the environment)
$ virtualenv StatisticalEnv
  • Activate the environment
$ source StatisticalEnv/bin/activate
  • Move to the root of the project
$ cd StatisticalPlatform
  • Install the requirements file
$ pip install -r requirements.txt

Installing Node Dependencies

  • Start a new terminal and navigate to the project root directory
$ cd StatisticalPlatform
  • Install dependencies
$ npm install

All dependencies needed for this app are now installed on your system. Now you can run this app in chrome. Instruction's on how to run this app can be found here.