Hprc banner tamu.png

Difference between revisions of "Bioinformatics:Conda Bioconda"

From TAMU HPRC
Jump to: navigation, search
(Created page with "= Description = You can create your own personal conda environment using Anaconda which installs conda and bioconda packages. You can install software that supports conda/bio...")
 
Line 1: Line 1:
= Description =
+
= Conda/Bioconda =
 +
__TOC__
 +
== Description ==
 
You can create your own personal conda environment using Anaconda which installs conda and bioconda packages.
 
You can create your own personal conda environment using Anaconda which installs conda and bioconda packages.
  
Line 8: Line 10:
 
You can create more than one environment in case you need specific versions of tools.
 
You can create more than one environment in case you need specific versions of tools.
  
= Initialization =
+
== 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.  
 
'''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.  
  
Line 22: Line 24:
 
</pre>
 
</pre>
  
= Create a new conda environment =
+
== Create a new conda environment ==
 
Then to create a conda environment called bio, do the following on the command line:
 
Then to create a conda environment called bio, do the following on the command line:
  
Line 43: Line 45:
 
</pre>
 
</pre>
  
= Install conda/bioconda packages into an existing environment =
+
== Install conda/bioconda packages into an existing environment ==
If you want to install tools such as fastq-multx and bwa into your bio environment (notice the (bio) indicating you are within the bio 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 purge'''
Line 51: Line 53:
 
  (bio) [net_id@ada7 any_directory]$ '''conda install fastq-multx bwa'''
 
  (bio) [net_id@ada7 any_directory]$ '''conda install fastq-multx bwa'''
  
= 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 (minus the #BSUB headers)
 
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 (minus the #BSUB headers)
 
<pre>
 
<pre>

Revision as of 11:25, 20 November 2017

Conda/Bioconda

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 (minus 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