Biosoftware in Roihu
In this tutorial you will learn:
- About the
bio-appsmeta module- How to search for applications
- How to install Bioconda packages
💬 Let’s imagine that we have some sequencing data that we wish to align to a reference genome and then count how many reads fall into each gene.
Looking for applications and related modules
- See the list of applications in Docs CSC and look for suitable aligners.
- Can you find for example TopHat, STAR, Bowtie and BWA aligners in the list?
- Which modules are needed to run these applications?
-
Let’s check if the HISAT2 aligner is available:
module spider hisat2☝🏻 All software installed on CSC’s supercomputers don’t necessarily have their own documentation page in the application list (yet). They might be new installations or installed by request of a single research group etc.
-
Now check whether you could load it right away:
module avail hisat2- Do you get a match? Compare with the
module spideroutput above.
☝🏻
module availlists only modules that are compatible with your currently loaded environment, whereasmodule spidersearches through all installed modules. Bio applications on Roihu are not visible until you loadbio-apps. - Do you get a match? Compare with the
-
Load the
bio-appsmeta module and check again:module load bio-apps module avail module list- Can you find HISAT2 now? Which other bio applications became available?
- Is HISAT2 itself among the loaded modules?
💡
bio-appsis a meta module: it doesn’t load any application itself, it only makes a set of them available for loading. -
You still need to load the aligner itself:
module load hisat2
HTSeq
💬 Let’s imagine you just did a successful aligning of the sequence data, and now want to count how many reads fall into each gene/feature.
- Unlike many other bio modules,
htseqis not included in thebio-appsmeta module
-
Try searching for the htseq tool by using the
module spidercommand:module spider htseq -
Load the module and try to run one of the
htseqcommands:module load htseq htseq-count --help
Extra: Installing packages from Bioconda
Bioconda is a popular Conda channel for bioinformatics software. It provides an easy method to install thousands of software packages related to biomedical research. Conda environments are, however, problematic on supercomputers with parallel file systems since they create too many files. The solution is to use containerized environments.
☝🏻 Installing software and containers will be discussed more in sections 8 and 9. Feel free to return to this tutorial later.
-
Look for the MetaBAT2 application like we did above with HTSeq:
module spider metabat2 - Check whether MetaBAT2 is available in Bioconda (type metabat2 in the search field):
- All packages in Bioconda have a ready-made Docker container image available. While those images could be pulled and used directly, CSC’s Tykky container wrapper provides an easy method to install them so that they are usable without any special container commands.
-
On the Bioconda page find the command to use Docker (don’t run it). In this case:
docker pull quay.io/biocontainers/metabat2:<tag> -
From the command we need the Docker address:
quay.io/biocontainers/metabat2 -
And from the tags page the desired version. In this case we choose the latest (secure) version:
2.18_23_gc869c52--h61f4f8f_0 -
Combine the address and tag to form the Docker URL:
docker://quay.io/biocontainers/metabat2:2.18_23_gc869c52--h61f4f8f_0 -
Clean your environment and load the Tykky container wrapper
module purge module load tykky -
Create a directory for the installation under your project’s
/projappldirectory:mkdir -p /projappl/<project>/$USER/metabat-2.18 # replace <project> with your CSC project, e.g. project_2001234 -
Wrap the container with:
wrap-container -w /usr/local/bin docker://quay.io/biocontainers/metabat2:2.18_23_gc869c52--h61f4f8f_0 --prefix /projappl/<project>/$USER/metabat-2.18 # replace <project> with your CSC project, e.g. project_2001234☝🏻 The
-woption specifies the installation directory inside the container. For containers from Bioconda this is always/usr/local/bin.☝🏻 The
--prefixoption is used to indicate the directory where we want to install the software.💡 After the installations finishes, the executables of the program will be in the directory
metabat-2.18/bin. Note that these are not the actual binaries, but rather wrapper scripts for the executables inside the container. You can, however, use them as if they were the actual commands. -
Add the
bindirectory to your$PATHas suggested by Tykky. This is analogous to activating the Conda environment in case of a direct Conda installation and allows you to execute commands from anywhere (without providing the full path to the binaries):export PATH="/projappl/<project>/$USER/metabat-2.18/bin:$PATH" # replace <project> with your CSC project, e.g. project_2001234 -
Try opening the help for the
metabatcommand:metabat --help
🗯 See here how to install containers from other sources such as the BioContainer registry or local image files.
More information
Using modules in a batch script
💬 Make sure to load all necessary modules and export required paths also in your batch scripts before launching any actual commands. It is good practice to start with module purge to ensure that you are working in a clean environment.
☝🏻 Note that if you are writing a batch script that uses applications from different modules, you should be mindful of the order in which you load (and possibly unload) the modules. Loading one module might automatically replace other ones to avoid conflicts.