Difference between revisions of "Bioinformatics:Conda Bioconda"
(→Using your conda Environment)
m (Cmdickens moved page Ada:NGS:Conda Bioconda to Bioinformatics:Conda Bioconda: make generic across clusters)
Revision as of 18:33, 18 December 2018
You can create your own personal conda environment using Anaconda which installs conda and bioconda packages.
You can install software that supports conda/bioconda installation inside the conda environment you create.
Once you create a conda environment, you can continue to install other packages into that environment.
You can create more than one environment in case you need specific versions of tools.
Before you begin, you will need to contact the HPRC helpdesk (email@example.com) to request a $SCRATCH file quota increase because creating a conda environment will add thousands of files to your $SCRATCH space.
After you get your file quota increase, the next thing you need to do is to add a few conda channels which contain certain bioinformatics tools.
You only need to do this step once in order to add the conda-forge and bioconda channels:
module purge module load Anaconda/3-184.108.40.206 conda config --add channels defaults conda config --add channels conda-forge conda config --add channels bioconda
Create a new conda environment
Then to create a conda environment called bio, do the following on the command line:
module purge module load Anaconda/3-220.127.116.11 conda create -n bio
After your bio environment is created, you will see output on how to activate and use your bio environment
# # To activate this environment, use: # > source activate bio # # To deactivate an active environment, use: # > source deactivate #
Install conda/bioconda packages into an existing environment
If you want to install packages such as fastq-multx and bwa into your bio environment (notice the (bio) indicating you are within the bio environment):
[net_id@ada7 any_directory]$ module purge [net_id@ada7 any_directory]$ module load Anaconda/3-18.104.22.168 [net_id@ada7 any_directory]$ source activate bio (bio) [net_id@ada7 any_directory]$ conda install fastq-multx bwa
Using your conda Environment
To use your bio environment in a job script, you must first activate the bio environment and then run tool commands (fastq-multx in this example). Here is a sample job script (excluding the #BSUB headers)
module load Anaconda/3-22.214.171.124 source activate bio fastq-multx -l barcodes.grp seq2.fastq.gz seq1.fastq.gz -o n/a -o out%.fq source deactivate