Difference between revisions of "Bioinformatics:Conda Bioconda"
(→Using your conda Environment) |
|||
Line 54: | Line 54: | ||
== Using your conda Environment == | == 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 ( | + | 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) |
<pre> | <pre> | ||
module load Anaconda/3-5.0.0.1 | module load Anaconda/3-5.0.0.1 |
Revision as of 12:45, 20 November 2017
Conda/Bioconda
Contents
Description
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.
Initialization
Before you begin, you will need to contact the HPRC helpdesk (help@hprc.tamu.edu) 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-5.0.0.1 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-5.0.0.1 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-5.0.0.1 [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-5.0.0.1 source activate bio fastq-multx -l barcodes.grp seq2.fastq.gz seq1.fastq.gz -o n/a -o out%.fq source deactivate