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:
From the command we need the Docker address:
We will also need a tag for the version we want to install. Open the address above in web browser:
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 the Tykky module:
We will use the Tykky wrap-container command.
The -w
parameter is needed to specify the installation directory inside the
container. For containers from Bioconda this is always /usr/local/bin
. For
containers from other sources, please see below.
The --prefix
parameter indicates the directory where we want to install the
environment on the shared file system (outside the container). The directory
needs to exist, so we we need to create it first. For example:
We can now install the software with:
wrap-container -w /usr/local/bin docker://quay.io/biocontainers/metabat2:2.17--h6f16272_1 --prefix /projappl/project_2001234/metabat-2.17
After the installations finishes, the executables for the program will be in directory
metabat-2.17/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. For example:
Adding the bin
directory to your $PATH
will work similarly as activating the
Conda environment in case of a direct Conda installation. When the wrap-container
command finishes, it will show you the export
command to do this. The actual command
will depend on the installation directory, but will be something like:
After this you can simply do:
Note
It is generally a bad idea to add Tykky installations permanently to your $PATH
by e.g. editing your .bashrc
file. The installation directories often contain
common commands like python
or perl
. These are specific for each installation,
and having them in your default $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 mono
.
First build a local container image:
You can now run command which
inside the container to find out the installation
location.
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 (mono.sif
).
In some cases the installation location is not in $PATH
inside the container, so
which
won't work. In those cases you could try running find
inside the container
instead:
In this case we search starting from the root directory(/
) for either a file
(-type f
) or (-o
) a symbolic link (-type l
) named mono
(-name mono
).