-
Notifications
You must be signed in to change notification settings - Fork 9
02. Install
The metagenomics workflows require the following software to be installed:
- Singularity
- Python 3
- Git
- Conda
- Snakemake
- Open Science Framework (OSF) client
The instructions below will help you get started installing and running the above software.
NOTE: If you previously ran the v1.0 workflows, then you can skip to the bottom of this page because you should only need to install the new source code.
There are multiple versions of Singularity that you can install. The latest version is 3.0.1, but the current supported version is 2.6.1.
Installation: To install your version of choice, simply execute the following commands (below we are installing version 2.6.1, but you can replace this with the newest version if you wish):
wget https://github.com/singularityware/singularity/releases/download/2.6.1/singularity-2.6.1.tar.gz
tar xvf singularity-2.6.1.tar.gz
cd singularity-2.6.1
./configure --prefix=/usr/local --sysconfdir=/etc
make
sudo make install To see if Singularity installed, you can check the version by running this command:
singularity --version Removal: If you need to remove an old version there are instructions here: singularity removal instructions. In a single command:
sudo rm -rf /usr/local/libexec/singularity /usr/local/etc/singularity /usr/local/include/singularity /usr/local/lib/singularity /usr/local/var/lib/singularity/ /usr/local/bin/singularity /usr/local/bin/run-singularity /usr/local/etc/bash_completion.d/singularity /usr/local/man/man1/singularity.1To download/setup singularity containers:
sudo yum install squashfs-toolsThe direct installation of Python 3 is optional (conda also installs this). Please install Python 3 however is most appropriate on your system. The below commands are specific to CentOS, and this particular method uses the Software Collections Repository (SCL).
To install python with yum:
sudo yum install centos-release-scl
sudo yum install rh-python36
scl enable rh-python36 bashVerify that Python 3.6 is installed:
python --version Install Git
sudo yum install gitOnce Python is installed, you can install the latest version of Miniconda using the following commands:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh You should accept the defaults, and we suggest saying yes to adding the Miniconda install location to your path. It makes entering the virtual environment easier.
Restart the terminal, then see which version of conda you have installed:
which conda Now you need to add the required conda channels:
conda config --add channels r
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda Now that you have conda installed, you can create an environment for your metagenomics work called metag:
conda create --name metagYou can activate and deactivate this environment by following the commands below. This can be executed from any directory. It is important to make sure you have activated the metag environment every time you start a new session for running these metagenomics workflows. For now, practice turning it on and off.
Activate the metag virtual environment:
source activate metag If you are inside the metag virtual environment, it will show:
(metag)[user@localhost ~]$To de-activate:
(metag)[user@localhost ~]$ source deactivate metag If you are outside the virtual environment, it will show:
[user@localhost ~]$Re-activate the metag environment before you proceed with this documentation. Once you are inside the metag virtual environment, follow the installation commands below to setup the software inside your environment.
Install datrie with conda:
conda install datrieYou'll also need to install psutil:
conda install psutilMake sure pip is up-to-date:
pip install --upgrade pipThen install snakemake with the following command:
pip install snakemake Install the Open Science Framework CLI client:
pip install osfclient Install the source code for the metagenomics project:
git clone https://github.com/signaturescience/metagenomics.git
cd metagenomics
git checkout tags/v1.1If you would like to view the wiki for the metagenomics project offline, it can be downloaded with the following command:
git clone https://github.com/signaturescience/metagenomics.wiki.gitNow that you have completed all the installations, you are ready to proceed to the Offline Setup.