Installing packages from Bioconda using Tykky
Bioconda is a popular Conda channel for bioinformatics software. It provides an easy method to install thousands of software packages related to biomedical research.
CSC has deprecated the direct usage of Conda installations on shared file systems of supercomputers (Puhti and Mahti) due to performance issues, but you can easily install packages from Bioconda using the Tykky tool instead.
All packages in Bioconda have a ready-made Docker container image available. While those images could be pulled and used directly, Tykky provides an easy method to install them in a way that they are usable without any special container commands.
Example: Installing MetaBAT2 from Bioconda
In this example we install MetaBAT2 package from Bioconda.
To find a software in Bioconda you can browse them alphabetically or use the search.
For our example we choose MetaBAT2 package.
In the page find the command to use Docker. In this case:
docker pull quay.io/biocontainers/metabat2:<tag>
From the command we need the Docker address:
From the Tags page select the desired version. In this case we choose the latest (the topmost) version.
Combine the address and tag to form Docker URL:
Load Tykky module
module load tykky
We will use the Tykky wrap-container command.
-w parameter needs to specify installation directory inside the container. For containers
from Bioconda this is always
/usr/local/bin. For containers from other sources, please see below.
--prefix parameter indicates the directory where we want to install the software. The
directory needs to exist, so we we need to create it first:
We can now install the software:
wrap-container -w /usr/local/bin docker://quay.io/biocontainers/metabat2:2.15--h986a166_1 --prefix metabat-2.15
After the installations finishes, the executables for the program will be in directory
metabat-2.15/bin. It should be noted that these are not the actual commands, but rather
wrapper scripts for the commands inside the container. You can, however, use them as if
they were the actual commands.
bin directory to your
$PATH will work the same as activating the Conda
environment in case of direct Conda installation.
wrap-container command finishes, it will show you the
to do this. The actual command will depend on the installation directory, but will
be something like:
After this you can simply do:
It is generally a bad idea to add Tykky installations permanently to you
$PATH by e.g.
.bashrc file. The installation directories often contain common commands
perl. These are specific for each installation, and having them in your
$PATH will cause problems with running other software. It's best to add the
installation directory to your
$PATH only when you are using the program. You can e.g. add the
export command to your batch job script.
Containers from other source
You can use similar steps to create wrappers for containers from other sources, such as the BioContainer registry or local image files.
The software installation location inside the container may vary, so it should be checked in
order to set
-w parameter correctly.
In this example we'll use a container for
First build a local container image:
apptainer build mono.sif docker://mono:126.96.36.199-slim
You can now run command
which inside the container to find out the installation location.
apptainer exec mono.sif which mono
In this case the directory is
/usr/bin. To install you could use the Docker address above
or specify the local image file just created (
wrap-container -w /usr/bin mono.sif --prefix mono
In some cases the installation location is not in
$PATH inside the container, so
won't work. In those cases you could try running
find inside the container instead:
apptainer exec mono.sif find / \( -type f -o -type l \) -name mono 2> /dev/null
In this case we search starting from the root directory(
/) for either a file (
-o) a symbolic link (
-type l) named "mono" (