Installation

The installation of CKG can be done in two different ways:

  1. Installation of Requirements –> This installation is recommended especially for admin users that want to customize and configure CKG app, Neo4j database, etc.

  2. Docker Image –> This installation is the easiest to install and can be used to quickly set up a server version of CKG and its components (Neo4j, JupyterHub). Admin users can still customize these services by modifying how the container is built.

Installation of Requirements

This installation is a two step process:

  1. Installation of Neo4j: The Neo4j graph database needs to be installed (https://neo4.com) and following the instructions here: Installing Neo4j

  2. Installation of CKG’s python library: installation of python and CKG’s modules:

../_images/installation_tech.png

You can follow this flowchart to make sure you have everything you need:

../_images/installation_flowchart.png

The installation instructions are optimised for operating systems MacOS and Linux. The installation on Windows systems is slightly different, please go to Windows Installation.

Requirements

Python

To facillitate the installation of Python, we recommend to use the Miniconda installer:

  1. Go to https://docs.conda.io/en/latest/miniconda.html and download the latest installer for your Operating System.

  2. Install python following the instructions in the installation wizard

  3. Open a terminal window to create a pyhton environment (https://docs.conda.io/projects/conda/en/4.6.1/user-guide/concepts.html#conda-environments)

  4. Run conda create -n ckgenv python= 3.7.9 (ckgenv is the name os the environment)

  5. Activate the environment by running in the terminal window: conda activate ckgenv

Note

To deactivate the environment run: conda deactivate

Warning

Always activate ckgenv environment when starting CKG app or accessing Jupyter notebooks.

R

Some of the analysis in CKG use R libraries (i.e SAMR, WGCNA) so they require having R installed. This installation is optional and for now compatible only for Unix Operating Systems but we are working on making them available also for Windows. Hence, the installation of R is only required when installing CKG in a Unix OS.

Make sure you have installed R version >= 3.6.1:

$ R --version

And that R is installed in /usr/local/bin/R:

$ which R

To install the necessary R packages, simply initiate R (terminal or shell) and run:

install.packages('BiocManager')
BiocManager::install()
BiocManager::install(c('AnnotationDbi', 'GO.db', 'preprocessCore', 'impute'))
install.packages(c('devtools', 'tidyverse', 'flashClust', 'WGCNA', 'samr'),
        dependencies=TRUE, repos='http://cran.rstudio.com/')
install.packages('IRkernel')

Note

If you need to install R, follow these tutorial.

Warning

In Mac OS, make sure you have XQuartz installed, as well as Xcode. For more information on how to install R on OS X, you can follow this link.

Now that you are all set, you can move on and start with Neo4j.

Redis (Only Unix OS)

This installation is only necessary for Unix Operating Systems (i.e MacOS, Linux) since Windows 10 already comes with Redis installed.

edis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. CKG uses redis-server in combination with [Celery queues](https://docs.celeryproject.org/en/stable/getting-started/introduction.html) to run asynchronous tasks such as project creation or project report generation.

For more details on how to install Redis you can follow the instructions [here](https://redis.io/topics/quickstart).

The installation steps are (check Ubuntu installation below):

  1. Download Redis

$ wget http://download.redis.io/redis-stable.tar.gz
  1. Untar the downloaded file

$ tar xvzf redis-stable.tar.gz
  1. Install redis using make

$ cd redis-stable
$ make

When running CKG app, you will need to start first the Redis server with:

$ redis-server

Warning

In Ubuntu, the installation of Redis can be done just with:

$ apt-get install redis-server

Docker Image

To avoid possible compatibility issues caused by different Operating systems, python and R versions, we recommend to follow the instructions to build and use the CKG Docker Container instead (https://www.docker.com/). By building the container and running it, you will get:

  • Neo4j

  • CKG

  • JupyterHub

../_images/docker_container.png