Skip to content

Instantly share code, notes, and snippets.

@alanorth
Last active September 12, 2017 04:41
Show Gist options
  • Save alanorth/100dd95f809223ae0100 to your computer and use it in GitHub Desktop.
Save alanorth/100dd95f809223ae0100 to your computer and use it in GitHub Desktop.
Manually installing QIIME 1.8.0 on CentOS 6.5...

QIIME 1.8.0 on CentOS 6.5

Installing QIIME manually in it's own prefix on CentOS 6.5. Our cluster has a network-mounted applications directory, so I wanted to install it once there, so all cluster nodes could use it.

Python 2.7.3

QIIME wants this specific version, so let's compile and install it into the qiime/1.8.0 prefix.

Prepare Python source:

$ cd /tmp
$ wget https://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.xz
$ tar xf Python-2.7.3.tar.xz
$ cd Python-2.7.3

Use newer GCC if available:

$ scl enable devtoolset-2 bash

Configure and build:

$ ./configure --prefix=/export/apps/qiime/1.8.0
$ sudo mkdir -p /export/apps/qiime/1.8.0
$ sudo chown aorth:aorth /export/apps/qiime/1.8.0
$ make install
$ curl https://bootstrap.pypa.io/get-pip.py | /export/apps/qiime/1.8.0/bin/python

QIIME and its dependencies

Install QIIME and dependencies using the python from above:

$ export PATH=/export/apps/qiime/1.8.0/bin:$PATH

QIIME wants NumPy:

$ pip install numpy==1.7.1

QIIME wants MatPlotLib:

$ cd /tmp
$ wget -c 'http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1.tar.gz?r=&ts=1404890842&use_mirror=garr' -O matplotlib-1.3.1.tar.gz
$ tar zxf matplotlib-1.3.1.tar.gz
$ cd matplotlib-1.3.1
$ python setup.py build
$ python setup.py install

QIIME wants PyCogent:

$ pip install cogent==1.5.3

QIIME wants biom-format:

$ pip install biom-format==1.3.1

QIIME wants qcli:

$ pip install qcli==0.1.0

QIIME wants pynast:

$ pip install pynast==1.2.2

QIIME wants Emperor:

$ pip install emperor==0.9.3

QIIME itself:

$ cd /tmp
$ wget https://pypi.python.org/packages/source/q/qiime/qiime-1.8.0.tar.gz
$ tar xf qiime-1.8.0.tar.gz
$ cd qiime-1.8.0
$ export PATH=/export/apps/qiime/1.8.0/bin:$PATH
$ scl enable devtoolset-2 bash
$ sudo mkdir -p /export/apps/qiime/1.8.0
$ sudo chown aorth:aorth /export/apps/qiime/1.8.0
$ python setup.py install --install-scripts=/export/apps/qiime/1.8.0/bin --install-purelib=/export/apps/qiime/1.8.0/lib

Set up the config:

$ cp /export/apps/qiime/1.8.0/lib/qiime/support_files/qiime_config /export/apps/qiime/1.8.0/qiime_config
$ export QIIME_CONFIG_FP=/export/apps/qiime/1.8.0/qiime_config

Test QIIME:

$ export PYTHONPATH=/export/apps/qiime/1.8.0/lib:$PYTHONPATH
$ print_qiime_config.py -t

QIIME Full deps...

Dependencies for a "full" QIIME... install them into qiime/1.8.0 prefix:

Infernal 1.0.2:

$ cd /tmp
$ wget ftp://selab.janelia.org/pub/software/infernal/infernal-1.0.2.tar.gz
$ cd infernal
$ cd infernal-1.0.2
$ ./configure --prefix=/export/apps/qiime/1.8.0
$ make
$ make install

R 3.0.2:

$ cd /tmp
$ wget http://cran.r-project.org/src/base/R-3/R-3.0.2.tar.gz
$ tar xf R-3.0.2.tar.gz
$ cd R-3.0.2
$ ./configure --enable-R-shlib --prefix=/export/apps/qiime/1.8.0
$ make -j4
$ make install

Install R modules by running the following R script, libraries.R:

options(repos="http://cran.case.edu")
install.packages('randomForest')
install.packages('optparse')
install.packages('vegan')
install.packages('ape')
install.packages('MASS')
install.packages('gtools')
install.packages('klaR')
install.packages('RColorBrewer')
q()

$ /export/apps/qiime/1.8.0/bin/R CMD BATCH libraries.R

Mothur 1.25.0:

$ cd /tmp
$ wget http://www.mothur.org/w/images/6/6d/Mothur.1.25.0.zip
$ unzip Mothur.1.25.0.zip
$ cd Mothur.source
$ sed -i 's/#CXX = g++44/CXX = g++/' makefile
$ sed -i 's/TARGET_ARCH += -arch x86_64/#TARGET_ARCH += -arch x86_64/' makefile
$ sed -i 's/#CXXFLAGS += -mtune=native -march=native -m64/CXXFLAGS += -mtune=native -march=native -m64/' makefile
$ sed -i 's/$LINK_OPTS//' uchime_src/mk
$ make
$ cp mothur uchime /export/apps/qiime/1.8.0/bin

Legacy NCBI BLAST 2.2.22:

$ cd /tmp
$ wget http://mirrors.vbi.vt.edu/mirrors/ftp.ncbi.nih.gov/blast/executables/release/2.2.22/blast-2.2.22-x64-linux.tar.gz
$ tar xf blast-2.2.22-x64-linux.tar.gz
$ cp blast-2.2.22/bin/* /export/apps/qiime/1.8.0/bin

tax2tree 1.0:

$ wget 'http://downloads.sourceforge.net/project/tax2tree/tax2tree-v1.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ftax2tree%2Ffiles%2Ftax2tree-v1.0.tar.gz%2Fdownload%3Fuse_mirror%3Dtene&ts=1415126866&use_mirror=tenet' -O tax2tree-v1.0.tar.gz
$ tar xf tax2tree-v1.0.tar.gz
$ cd tax2tree-v1.0
$ python setup.py build
$ python setup.py install

usearch v5.2.236:

$ wget http://drive5.com/cgi-bin/upload3.py?license=2014110411231511736 -O usearch
$ sudo cp usearch /export/apps/qiime/1.8.0/bin
$ sudo chmod +x /export/apps/qiime/1.8.0/bin/usearch

usearch v6.1.544:

$ wget http://drive5.com/cgi-bin/upload3.py?license=2014110411322525582 -O usearch61
$ sudo cp usearch61 /export/apps/qiime/1.8.0/bin
$ sudo chmod +x /export/apps/qiime/1.8.0/bin/usearch61

rtax 0.984:

$ wget http://static.davidsoergel.com/rtax-0.984.tgz
$ tar xf rtax-0.984.tgz
$ sudo mkdir -p /export/apps/rtax
$ sudo cp -r rtax-0.984 /export/apps/rtax/0.984
$ sudo chown -R root:root /export/apps/rtax/0.984

SourceTracker 0.9.5:

$ cd /tmp
$ wget 'http://downloads.sourceforge.net/project/sourcetracker/sourcetracker-0.9.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsourcetracker%2Ffiles%2Fsourcetracker-0.9.5.tar.gz%2Fdownload%3Fuse_mirror%3Dheanet&ts=1415266680&use_mirror=heanet' -O sourcetracker-0.9.5.tar.gz
$ tar xf sourcetracker-0.9.5.tar.gz
$ sudo mkdir /export/apps/sourcetracker
$ sudo cp -r sourcetracker-0.9.5 /export/apps/sourcetracker/0.9.5
$ sudo chown -R root:root /export/apps/sourcetracker/0.9.5

ClearCut v1.0.9:

$ cd /tmp
$ wget http://www.mothur.org/w/images/9/91/Clearcut.source.zip
$ unzip Clearcut.source.zip
$ cd clearcut
$ scl enable devtoolset-2 bash
$ make
$ sudo cp clearcut /export/apps/qiime/1.8.0/bin

Test!

$ print_qiime_config.py -t

Change permissions back to root!

$ sudo chown -R root:root /export/apps/qiime/1.8.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment