Spack Modules How to Find, Install, and Load - statonlab/UTIA_Computational_Resource GitHub Wiki

While we have provided most of the programs necessary for general bioinformatic analyses, there may be programs you need to run that are unavailable in the software directory. In these cases, we recommend using Spack, a package management tool that allows for installation and loading of a wide range of programs.

1. Is your package available through Spack?

While Spack supports multiple programs, it does not contain every program ever created. To check if your package of interest is available in Spack, run the following command:

spack list <package-name>

For example, running spack list blast gives the following results:

$ spack list blast
==> 7 packages.
blast-legacy  blast-plus  blast2go  graphblast  ncbi-magicblast  ncbi-rmblastn  samblaster

Because there are multiple programs containing the word "blast," multiple programs are returned.

2. Is your package already installed on our servers?

Before attempting to install a new module with Spack, please check for your package in our system using the following command:

spack find <package>

This will list all instances of that package currently installed on our system. Be sure to keep note if there is more than one version of your package - you will need to load a specific version if there is.

3. Installing new modules

If a Spack module is available through Spack but not on our systems, run the following command to install it:

spack install <program>

If your program requires missing dependencies, they will be installed alongside your main package. If you run into any issues installing a package - busco, for instance, has given us errors in the past - please let us know so that we may either get it working with Spack or installed by some other means.

4. Loading a module

If your module is installed in spack, you can load it for use with the following command:

spack load <program>

If there are multiple versions of a package, like in the case of Samtools, you will need to specify a version number:

spack load [email protected]

Once loaded, you should be able to use the program of interest now. If, at any point, you need to unload a package, do so using the following command:

spack unload <program>
⚠️ **GitHub.com Fallback** ⚠️