Bioconda: Difference between revisions

From RCSWiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 12: Line 12:
$ module avail bioconda
$ module avail bioconda
-------------------- /global/software/Modules/4.6.0/modulefiles -----------------
-------------------- /global/software/Modules/4.6.0/modulefiles -----------------
bioconda/2018.11  bioconda/conda3 
bioconda/2024-10 
</pre>
 
* '''BioConda/2024-10''' is based on the <code>bioconda</code> and <code>conda-forge</code> channels.
: It does not depend nor use the Anaconda <code>base</code> and <code>anaconda</code> channels to avoid any licensing complications.
: It was installed in October 2024 and includes a large number of more popular BioConda packages.
 
You can load the module
<pre>
$ module load bioconda/2024-10
 
### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ###
This is a stub module. It does not activate the central BioConda install.
If you want to activate BioConda/2024-10 please use the following command in your job script:
 
source /global/software/bioconda/init-2024-10
 
Module activation does not work propely for this BioConda due to technical limitaions.
This may change in the future.
### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ###


$ module load biconda/2018.11
Loading bioconda/2024-10
Loading bioconda/2018.11
   ERROR: Module evaluation aborted
   Loading requirement: bioconda/conda3
</pre>
</pre>
The message indicate that the module cannot activate BioConda correctly, so you have to use the command
source /global/software/bioconda/init-2024-10


Check software
instead.
 
Once you have BioConda activated you can check the software
<pre>
<pre>
$ samtools --version
$ samtools --version
samtools 1.9
samtools 1.21
Using htslib 1.9
Using htslib 1.21
Copyright (C) 2018 Genome Research Ltd.
Copyright (C) 2024 Genome Research Ltd.


$ salmon --version
$ salmon --version
salmon 0.11.3
version : 0.8.1


$ kraken --version
$ kraken --version
Kraken version 0.10.6-unreleased
Kraken version 1.1.1
Copyright 2013-2015, Derrick Wood (dwood@cs.jhu.edu)
Copyright 2013-2019, Derrick Wood, Jennifer Lu (jlu26@jhmi.edu)
</pre>
</pre>


Get the list of installed packages:
Get the full list of installed packages:
<pre>
<pre>
$ conda list
$ conda list
....
....
</pre>
or search for a specific package:
<pre>
$ conda list STAR
# packages in environment at /global/software/bioconda/2024-10/envs/bioconda:
#
# Name                    Version                  Build  Channel
star                      2.7.11a              h0033a41_0    bioconda
star-fusion              1.7.0                        1    bioconda
staramr                  0.10.0            pyhdfd78af_0    bioconda
starcode                  1.4                  h031d066_5    bioconda
starfish                  0.2.2              pyhdfd78af_0    bioconda
</pre>
== Installing your own personal BioConda ==
If the preinstalled versions provided by the modules '''do not work for you''', you can
* '''Install your own Conda''', following [[Conda on ARC#Installing Conda | these instructions]].
* '''Create a new BioConda environment''':
conda create -n bioconda</code>
* '''Activate the environment''':
conda activate bioconda
* '''Install the required packages'''
conda install -c bioconda samtools star salmon kraken
== Using Conda in your job scripts ==
=== Centrally Installed BioConda ===
If you want to use the preinstalled BioConda environment:
<code>preinstalled-bioconda-job.slurm</code>:
<source lang=bash>
#! /bin/bash
# ====================================
#SBATCH --job-name=conda-test
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4GB
#SBATCH --time=0-01:00:00
# ====================================
# Activate BioConda.
source /global/software/bioconda/init-2024-10
# Use the software here.
....
....
</source>
=== Personal Conda ===
If you are going to be using your own personal BioConda install:
<code>personal-conda-job.slurm</code>:
<source lang=bash>
#! /bin/bash
# ====================================
#SBATCH --job-name=conda-test
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4GB
#SBATCH --time=0-01:00:00
# ====================================
# Activate Conda and then the environment.
source ~/software/init-conda
conda activate bioconda
# Use the software here.
....
....
</pre>
....
 
</source>


= Links =
= Links =
[[ARC Software pages]]
[[ARC Software pages]]

Latest revision as of 21:55, 14 November 2024

General

Bioconda on ARC

Available modules

To activate

$ module avail bioconda
-------------------- /global/software/Modules/4.6.0/modulefiles -----------------
bioconda/2024-10  
  • BioConda/2024-10 is based on the bioconda and conda-forge channels.
It does not depend nor use the Anaconda base and anaconda channels to avoid any licensing complications.
It was installed in October 2024 and includes a large number of more popular BioConda packages.

You can load the module

$ module load bioconda/2024-10

### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ###
This is a stub module. It does not activate the central BioConda install.
If you want to activate BioConda/2024-10 please use the following command in your job script:

source /global/software/bioconda/init-2024-10

Module activation does not work propely for this BioConda due to technical limitaions.
This may change in the future.
### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ###

Loading bioconda/2024-10
  ERROR: Module evaluation aborted

The message indicate that the module cannot activate BioConda correctly, so you have to use the command

source /global/software/bioconda/init-2024-10

instead.

Once you have BioConda activated you can check the software

$ samtools --version
samtools 1.21
Using htslib 1.21
Copyright (C) 2024 Genome Research Ltd.

$ salmon --version
version : 0.8.1

$ kraken --version
Kraken version 1.1.1
Copyright 2013-2019, Derrick Wood, Jennifer Lu (jlu26@jhmi.edu)

Get the full list of installed packages:

$ conda list
....

or search for a specific package:

$ conda list STAR
# packages in environment at /global/software/bioconda/2024-10/envs/bioconda:
#
# Name                    Version                   Build  Channel
star                      2.7.11a              h0033a41_0    bioconda
star-fusion               1.7.0                         1    bioconda
staramr                   0.10.0             pyhdfd78af_0    bioconda
starcode                  1.4                  h031d066_5    bioconda
starfish                  0.2.2              pyhdfd78af_0    bioconda

Installing your own personal BioConda

If the preinstalled versions provided by the modules do not work for you, you can

  • Create a new BioConda environment:
conda create -n bioconda
  • Activate the environment:
conda activate bioconda
  • Install the required packages
conda install -c bioconda samtools star salmon kraken

Using Conda in your job scripts

Centrally Installed BioConda

If you want to use the preinstalled BioConda environment: preinstalled-bioconda-job.slurm:

#! /bin/bash
# ====================================
#SBATCH --job-name=conda-test
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4GB
#SBATCH --time=0-01:00:00
# ====================================
# Activate BioConda.
source /global/software/bioconda/init-2024-10

# Use the software here.
....
....

Personal Conda

If you are going to be using your own personal BioConda install: personal-conda-job.slurm:

#! /bin/bash
# ====================================
#SBATCH --job-name=conda-test
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4GB
#SBATCH --time=0-01:00:00
# ====================================
# Activate Conda and then the environment.
source ~/software/init-conda
conda activate bioconda

# Use the software here.
....
....

Links

ARC Software pages