-
Notifications
You must be signed in to change notification settings - Fork 9
02. Install
The MetScale workflows require the following software to be installed:
- Singularity
- Python 3 and other dependencies
- Git
- Conda
- Conda channels: r, defaults, conda-forge, bioconda
- Snakemake
- Datrie
- Psutil
- R packages: r-base, r-essentials, r-ggplot2, r-DT
- Open Science Framework (OSF) client
The instructions below will help you get started installing and running the above software.
There are multiple versions of Singularity that you can install. The Version 3.2.0-1 or greater is required to run the workflows (NOTE: older versions 3.0.1 and 2.6.1 are no longer supported).
Installation: To install Singularity, please follow the instructions on this site: https://sylabs.io/guides/3.2/user-guide/installation.html
To see if you have the correct Singularity version (3.2.1 or greater) 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.
To 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 (python 3.7+ required). Verify that Python 3.7 (or newer) is installed:
python3 --version After you have ensured that the correct version of python is installed, you will need to install in following:
python -m pip install -U matplotlib The following should also be installed on your server:
sudo yum install mysql-devel
sudo yum install postgresql-develInstall Git
sudo yum install gitVerify that Git 1.8.3.1 (or newer) is installed:
git --version Once 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 We recommend accepting the defaults and typing "yes" when prompted to add the Miniconda installation location to your path. This makes entering the virtual environment easier in the future.
Restart the terminal, then see if and where conda is installed:
which conda Verify that conda 4.6.14 or later is installed:
conda --version To update conda:
conda update -n base condaRemoval: To remove your old version of conda before installation, there are instructions here: conda instructions.
Now that you have conda installed, you can create an environment for your work called metscale:
conda create --name metscaleYou 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 metscale environment every time you start a new session for running these MetScale workflows. For now, practice turning it on and off.
Activate the metscale virtual environment:
conda activate metscaleIf you are inside the metscale virtual environment, it will show:
(metscale)[user@localhost ~]$To de-activate:
(metscale)[user@localhost ~]$ conda deactivateIf you are outside the virtual environment, it will show:
[user@localhost ~]$Re-activate the metscale environment before you proceed with this documentation. Once you are inside the metscale virtual environment, follow the installation commands below to setup the software inside your environment.
Now you need to add the required conda channels:
conda config --add channels r
conda config --add channels conda-forge
conda config --add channels bioconda Install datrie with conda:
conda install datrie -yInstall psutil with conda:
conda install psutil -yThen install snakemake with the following command:
conda install snakemake=5.5.3 -y Verify that Snakemake 5.5.3 is installed:
snakemake --version Then install additional packages with the following commands:
conda install -c r r-base -y
conda install -c r r-essentials -y
conda install -c r r-ggplot2 -y
conda install -c r r-DT -y
conda install -c conda-forge conda-forge::r-stringi
conda install -c r r-dplyr -y
conda install -c r r-tidyr -y
conda install -c r r-r.utils -y
conda install -c r r-rjson -y
conda install -c r r-ggfittext -yMake sure pip is up-to-date:
pip install --upgrade pipInstall the Open Science Framework CLI client:
pip install osfclient Install the source code for the MetScale workflows for the first time:
git clone https://github.com/signaturescience/metscale.git
cd metscale
git checkout tags/v1.4If the MetScale workflows have previously been installed, update the source code:
cd metscale
git pull origin master
git checkout tags/v1.4To checkout previous development versions of the code (i.e. v1.3), you may specify the version in your git checkout command:
git checkout tags/v1.3If you would like to view the wiki for the MetScale project offline, it can be downloaded with the following command:
git clone https://github.com/signaturescience/metscale.wiki.gitNow that you have completed all the installations, you are ready to proceed to the Offline Setup.