Skip to content

Microbiome Helper Tools Install

Gavin Douglas edited this page Sep 6, 2017 · 23 revisions

See the commands below for how to install the resources included with the Microbiome Helper VBox on a fresh Ubuntu 16.04.2 server. These commands will be updated over time as new resources are added.

Note that the versions aren't necessarily the most recent, but were when these commands were run.

This could be a useful resource to link to for users installing the microbiome helper tools themselves.

Microbiome Helper scripts

Cloned GitHub repository (I used sudo since this was run in /usr/local/prg) and entered directory.

sudo git clone https://github.com/LangilleLab/microbiome_helper.git
cd microbiome_helper

Made symbolic links of all scripts (files ending in .py, .pl, and .R) to /usr/local/bin.

for script in *.py; do sudo ln -s $PWD/$script /usr/local/bin/$script; done
for script in *.pl; do sudo ln -s $PWD/$script /usr/local/bin/$script; done
for script in *.R; do sudo ln -s $PWD/$script /usr/local/bin/$script; done

Installed Perl dependencies:

cpan App::cpanminus  # Use sudo option to install globally
sudo cpanm Parallel::ForkManager
sudo apt-get install perl-doc

PICRUSt (v1.1.1)

First installed required python packages with pip:

h5py (v2.7.0) and numpy (v1.13.1)

Note that numpy is installed automatically with the below command.

pip install h5py

Downloaded latest PICRUSt release, untar/gunzip, remove gzipped file, enter directory.

wget https://github.com/picrust/picrust/releases/download/1.1.1/picrust-1.1.1.tar.gz  
tar -zxvf picrust-1.1.1.tar.gz  
rm picrust-1.1.1.tar.gz  
cd picrust-1.1.1  

Place pre-calculated files in picrust/data

At this stage one would usually download the pre-calculated files of interest from the PICRUSt website e.g. with wget. I had previously downloaded these files and placed them in our scratch data folder (which is specific to our server) so instead I created symbolic links to these files.

First I entered picrust/data:

cd picrust/data

Then made symbolic links to the pre-calculated tables of counts:

ln -s /scratch/db/picrust_precalculated_v1.1.1/13_5/16S_13_5_precalculated.tab.gz $PWD/16S_13_5_precalculated.tab.gz
ln -s /scratch/db/picrust_precalculated_v1.1.1/13_5/ko_13_5_precalculated.tab.gz $PWD/ko_13_5_precalculated.tab.gz
ln -s /scratch/db/picrust_precalculated_v1.1.1/13_5/cog_13_5_precalculated.tab.gz $PWD/cog_13_5_precalculated.tab.gz
ln -s /scratch/db/picrust_precalculated_v1.1.1/13_5/rfam_13_5_precalculated.tab.gz $PWD/rfam_13_5_precalculated.tab.gz

And also to the pre-calculated tables of variances so that confidence intervals can be calculated:

ln -s /scratch/db/picrust_precalculated_v1.1.1/13_5/variances/16S_13_5_precalculated_variances.tab.gz $PWD/16S_13_5_precalculated_variances.tab.gz
ln -s /scratch/db/picrust_precalculated_v1.1.1/13_5/variances/cog_13_5_precalculated_variances.tab.gz $PWD/cog_13_5_precalculated_variances.tab.gz
ln -s /scratch/db/picrust_precalculated_v1.1.1/13_5/variances/ko_13_5_precalculated_variances.tab.gz $PWD/ko_13_5_precalculated_variances.tab.gz
ln -s /scratch/db/picrust_precalculated_v1.1.1/13_5/variances/rfam_13_5_precalculated_variances.tab.gz $PWD/rfam_13_5_precalculated_variances.tab.gz

Run pip to install PICRUSt

Finally to install PICRUSt I navigated to the folder containing setup.py and ran pip install.

cd ../..
pip install

Other PICRUSt dependencies automatically installed:

  • biom-format (v2.1.6)
  • click (v6.7)
  • cogent (v1.5.3)
  • future (v0.16.0)
  • scipy (v0.19.1)
  • pandas (v.0.19.2)
  • pyqi (v0.3.2)
  • pytz (v2017)
  • python_dateutil (v2.6.1)

R (v3.4.1)

There are good instructions here for how to install R on ubuntu 16.04: https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-16-04-2

Add external repository maintained by R community:

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

I was missing the add-apt-repository command and had to install software-properties-common to fix this problem:

sudo apt-get install software-properties-common

Install R with apt-get.

sudo apt-get install r-base

R packages can be installed within an R environment by starting the program with sudo -i R so that they will be installed globally.

Install ape (v4.1) in R

Start R environment as root and install.

sudo -i R
install.package("ape") # In R environment

MetaPhlAn2

Download, extract and link MetaPhlAn2:

curl -o /tmp/metaphlan2.zip \
  https://bitbucket.org/biobakery/metaphlan2/get/2.6.0.zip
sudo unzip /tmp/metaphlan2.zip -d /usr/local/prg/
sudo mv /usr/local/prg/biobakery-metaphlan2-c43e40a443ed/ \
  /usr/local/prg/metaphlan2-2.6.0
sudo ln -s \
  /usr/local/prg/metaphlan2-2.6.0/{metaphlan2,strainphlan}.py /usr/local/bin/
rm /tmp/metaphlan2.zip

Install dependencies:

sudo /usr/bin/pip install numpy biom-format

HUMAnN2, DIAMOND and Bowtie 2

HUMAnN2, by default, also installs compatible versions of both DIAMOND and Bowtie 2.

sudo /usr/bin/pip install humann2

Download and configure the default HUMAnN2 databases:

sudo mkdir /scratch/db/humann2
sudo humann2_databases --download utility_mapping full /scratch/db/humann2
sudo humann2_databases --download uniref uniref90_diamond /scratch/db/humann2
sudo humann2_databases --download chocophlan full /scratch/db/humann2

You may wish to download Bowtie 2 databases to use with contaminant filters, like Phi X. Store them in /scratch/db/bowtie/ and symlink them to /home/shared/bowtiedb/ (to work with the metagenomics protocol).

Trimmomatic

Note that Trimmomatic depends on Java, which can be installed with sudo apt-get install default-jre on Ubuntu 16.04.

curl -o /tmp/trimmomatic.zip \
  -L http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.36.zip
sudo unzip /tmp/trimmomatic.zip -d /usr/local/prg/
rm /tmp/trimmomatic.zip

FASTX-Toolkit

sudo apt-get install fastx-toolkit

FastQC

curl -o /tmp/fastqc.zip \
    -L http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.5.zip
sudo unzip /tmp/fastqc.zip -d /usr/local/prg/
sudo chmod 755 /usr/local/prg/FastQC/fastqc
sudo ln -s /usr/local/prg/FastQC/fastqc /usr/local/bin/

PEAR

Went to https://sco.h-its.org/exelixis/web/software/pear/ and hit new downloads page. Selected academic license and filled in required information. Uploaded to /usr/local/prg and put in folder pear with LICENSE.

cd pear/pear-0.9.10-linux-x86_64/bin/
sudo ln -s /usr/local/prg/pear/pear-0.9.10-linux-x86_64/bin/pear /usr/local/bin/pear

BBMAP

Downloaded BBMAP from https://sourceforge.net/projects/bbmap/. Uploaded to /usr/local/prg.

sudo gunzip BBMap_37.50.tar.gz
sudo tar -xf BBMap_37.50.tar

BBMAP files are now in the folder /usr/local/prg/bbmap.

VSEARCH

cd /usr/local/prg
sudo wget https://github.com/torognes/vsearch/releases/download/v2.4.4/vsearch-2.4.4-linux-x86_64.tar.gz
sudo gunzip vsearch-2.4.4-linux-x86_64.tar.gz
sudo tar -xf vsearch-2.4.4-linux-x86_64.tar
cd vsearch-2.4.4-linux-x86_64/bin
sudo ln -s $PWD/vsearch /usr/local/bin/vsearch

SORTMERNA

cd /usr/local/prg
sudo wget http://bioinfo.lifl.fr/RNA/sortmerna/code/sortmerna-2.1-linux-64-multithread.tar.gz
sudo gunzip sortmerna-2.1-linux-64-multithread.tar.gz
sudo tar -xf sortmerna-2.1-linux-64-multithread.tar
cd sortmerna-2.1b
sudo ln -s /usr/local/prg/sortmerna-2.1b/sortmerna /usr/local/bin/sortmerna
sudo ln -s /usr/local/prg/sortmerna-2.1b/indexdb_rna /usr/local/bin/indexdb_rna

SUMATRA

sudo wget https://git.metabarcoding.org/obitools/sumatra/uploads/251020bbbd6c6595cb9fce6077e29952/sumatra_v1.0.20.tar.gz
sudo tar -zxvf sumatra_v1.0.20.tar.gz
cd sumatra_v1.0.20
sudo make
sudo ln -s /usr/local/prg/sumatra_v1.0.20/sumatra /usr/local/bin/sumatra
Clone this wiki locally