1b. Manual Installation - Oshlack/Slinker GitHub Wiki

Clone the Slinker git repository

Via the command line/terminal, navigate to the folder where you would like Slinker installed and execute:

git clone [email protected]:Oshlack/Slinker.git or git clone https://github.com/Oshlack/Slinker.git

Depending on whether you have setup SSH keys.

Install Dependencies

Slinker has both internal and external dependencies that need to be installed. But before we get to that, let's install Anaconda!

Install Anaconda

The Slinker installation process heavily relies on https://www.anaconda.com/. This simplifies the process of ensuring that the correct versions of dependent packages are installed. If these versions deviate, there is a risk that the output will differ from what was intended.

  1. Download and Install Anaconda

    Installation instructions for Anaconda can be found here.

  2. Activate bioconda

    Enter the below in order (!important)

    1. conda config --add channels conda-forge
    2. conda config --add channels defaults
    3. conda config --add channels r
    4. conda config --add channels bioconda
  3. Create a new environment using the supplied yaml file

    Navigate to where you installed the Slinker package and then execute conda env create -f env/slinker.yml.
    This will create the "slinker" environment which you will need to activate each time you wish to use Slinker.

  4. Activate environment

    Depending on your Anaconda version, either of these should do the trick.
    source activate slinker or conda activate slinker.

Install Internal Dependencies

Slinkers visualisation requires two in-house developed packages. The Slinker Visualisation package does the heavy lifting in terms of formatting files correctly for the Canvas package. The Canvas package is a general purpose visualisation tool, much in the spirit of the fantastic GViz R package... but for Python!

  1. Install Slinker

    From the clone root execute: pip install tools/Slinker/.

  2. Install Canvas

    From the clone root execute: pip install tools/Canvas/.

Install External Dependencies

Slinker requires some big name tools to make the visualisations possible. Namely STAR, Samtools, and Bpipe.

  1. Install bpipe

  2. This is an easy one to start off with! Head over to bpipe's Github page. and download version 0.9.9.7 of bpipe (http://download.bpipe.org/versions/bpipe-0.9.9.7.tar.gz).

    You can follow the instructions below, but all you really need to do is extract it somewhere and add the bin folder to your path.

    Simon has created a lot of documentation on bpipe http://docs.bpipe.org.

  3. Install stringtie2
    Follow the steps outlined here.
  4. Install STAR
    Follow the steps outlined here.
  5. Install Gffread
    Follow the steps outlined here.
  6. Install Samtools
    Follow the steps outlined here.
    NOTE: There is some functionality that Slinker requires in more recent versions, please try and install 1.13 which is the version that Slinker has been tested on.

Setup Tools

Now obviously if you already have other methods of using these tools (modules/previous installations/whatever). Just make sure that the following paths are set and Slinker will run.

The first thing to do is to make life easy and set an environmental variable for the slinker directory: export SLINKERDIR=/path/to/slinker_root

Now, you can either continue creating environment paths to each of the tool locations OR you can edit the tools.groovy file in $SLINKERDIR/workflows/tools.groovy.

Environment paths

  1. Bpipe
    In the bpipe installation directory, add the bin folder to the path:

    export PATH=<bpipe_installation_folder>/bin/:$PATH

  2. Stringtie2
    In the Stringtie2 installation directory:

    export stringtie=<stringtie_installation_folder>/stringtie

  3. STAR
    In the STAR installation directory:

    export star=<star_installation_folder>/source/STAR

  4. Samtools
    In the Samtools installation directory:

    export samtools=<samtools_installation_folder>/bin/samtools

Edit tools.groovy

  1. Bpipe
    In the bpipe installation directory, add the bin folder to the path:

    export PATH=<bpipe_installation_folder>/bin/:$PATH

  2. Simply enter the paths that you would typically assign to variables above in this file instead.

    vi $SLINKERDIR/workflows/tools.groovy

Retrieve Annotations

If you already have these references or wish to use your own, use the gtf and fasta parameters to input them into the pipeline, i.e. use yours, not the below, save yourself this download if you want.

Rather than bundling some giant annotations in this repository, I thought it would be easier to just point you to the source.

  1. From the clone root execute:

    wget https://ftp.ensembl.org/pub/release-96/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz -P $PWD/references/

    wget https://ftp.ensembl.org/pub/release-75/fasta/homo_sapiens/dna/Homo_sapiens.GRCh37.75.dna.primary_assembly.fa.gz -P $PWD/references/

  2. Now let's unpack those downloaded and supplied references:

    gunzip $PWD/references/*.gz

Uninstalling Slinker

Sorry to see you go! Uninstalling should be really easy with Anaconda after you have deactivated (conda deactivate slinker).

conda remove --name slinker --all

Follow the relevant documentation on the https://www.anaconda.com/ website to uninstall conda, if required.

⚠️ **GitHub.com Fallback** ⚠️