rnaQUAST Installation Using Conda - weaponsforge/fastractor GitHub Wiki
Description
The following methods describe how to install rnaQUAST on a CentOS 8 machine using conda.
Conda is a python version manager tool, like pyenv. This is the most recommended package manager to install rnaQUAST and all of its dependencies seamlessly. Installing rnaQUAST from the Github release archive using pyenv on the requirements.txt
, or the required python packages dependencies produces an incomplete install, which leads to errors on the test command rnaQUAST.py --test
.
Content
- Prerequisites
- Install Conda
- Set Up a Conda Environment for rnaQUAST
- Install rnqQUAST
- Use Conda to Manage Python Versions
Prerequisites
The following dependencies were used for this tutorial. Feel free to use your own versions.
- Virtual Box 6.14 (for Windows OS)
- CentOS Linux release 8.2.2004 (Core) - VM (guest OS) running on Virtual Box
- Memory: 4 GB
- Processors: 2
- Hard Disk: 95 GB
- kernel 4.18.0-193.19.1.el8_2.x86_64
- Anaconda
- Anaconda3-5.2.0-Linux-x86_64.sh (or other versions)
- this will install conda version 4.5.4
- rnaQUAST
- release version 2.2.0
Install Conda
- Install Anaconda.
- Download the anaconda installer.
curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
- Run the installer.
./Anaconda3-2019.03-Linux-x86_64
- Select/do the following on installation prompts:
- Press ENTER to continue and lots of ENTER read through the license.
- Do you approve the license terms? [yes|no] - enter yes
- Anaconda3 will now be installed into this location: - press ENTER
- Do you wish the installer to prepend the Anaconda3 install location to PATH in your /home/adminuser/.bashrc ? [yes|no] - type yes
- activate the anaconda installation.
source ~/.bashrc
- Verify your installation.
conda info
- Download the anaconda installer.
Set Up a Conda Environment for rnaQUAST
- View available Python versions.
conda search "^python$"
- Create a conda environment which we will name "rna" exclusive for rnaquast running on python 3.6.1. Or we can select the python version no. from the list on step #1.
conda create --name rna python=3.6.1
- Activate your environment.
source activate rna
INFO: This is the recommended way to activate an environment. Do not activate using
conda activate rna
- Take note of the installed python version in use with your environment.
python -V
- To deactivate your environment:
source deactivate
INFO: This is the recommended way to deactivate an environment. Do not activate using
conda deactivate rna
Install rnqQUAST
- Set-up and activate a conda environment first for rnaQUAST. Follow the notes on Set Up a Conda Environment for rnaQUAST.
source activate rna
(if the environment is not yet active) - Install rnaquast inside the environment.
conda install -c bioconda rnaquast
- Test rnaquast.
rnaQUAST.py --test
- If an error will result from #3 saying:
-
blastn: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such directory conda
- install libsnl, then re-run
rnaQUAST.py --test
again.sudo dnf install libnsl rnaQUAST.py --test
-
Use Conda to Manage Python Versions
Use conda to install differing Python versions required by different projects by creating conda environments. This way, there will be no Python versions or python packages conflicts across different projects.
All we need to do per project is:
- Create a conda environment with a target python version for a project.
conda create --name MY_ENVIRONMENT_NAME python=PYTHON_VERSION_NO
- Activate the conda environemnt.
source activate MY_ENVIRONMENT_NAME
- Verify the environment's python version, and that it is installed on its isolated environment.
python -V which python // -> will return /home/adminuser/anaconda3/envs/MY_ENVIRONMENT_NAME/bin/python
- Install the project's python packages under the environment. For example, numpy, matlib and gnuplot will only be available under MY_ENVIRONMENT_NAME, and not on SOME_OTHER_ENVIRONMENT:
pip install numpy pip install matlib conda install gnuplot ...
- Deactivate your environment when finished processing.
source deactivate MY_ENVIRONMENT_NAME
- Repeat from step #1 for other python projects.
- To view available conda environments:
conda info --env