-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lael Barlow
committed
Jan 15, 2025
1 parent
06de6a5
commit d78baf6
Showing
4 changed files
with
78 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
# How to install and run AMOEBAE on Digital Research Alliance of Canada (DRAC) clusters | ||
|
||
**Note**: This is mostly relevant for AMOEBAE users in Canada. However, this approach can be easily adapted to any high performance computing cluster. | ||
|
||
AMOEBAE depends on Conda packages, but installing Conda packages directly on DRAC isn't appropriate for the system. One way to circumvent that issue is to install dependencies in an Apptainer container, by performing the following steps. | ||
|
||
1. Log on to a DRAC cluster login node, clone the amoebae repository, and navigate into the amoebae directory. Upload your sequence data, as needed using an appropriate method (see [DRAC documentation on data transfers](https://docs.alliancecan.ca/wiki/Transferring_data)). Also, I recommend doing the subsequent steps in a screen or tmux session so that your work won't be interrupted if you get disconnected (see [DRAC documentation on prolonging terminal sessions](https://docs.alliancecan.ca/wiki/Prolonging_terminal_sessions)). | ||
|
||
2. Build the container using the `pixi.def` definition file provided in the AMOEBAE repository (see [DRAC Apptainer documentation](https://docs.alliancecan.ca/wiki/Apptainer)): | ||
```bash | ||
module load apptainer | ||
apptainer build --disable-cache pixi.sif pixi.def | ||
``` | ||
- This will take a few minutes. | ||
|
||
3. To run AMOEBAE workflow steps requiring internet access (`download_queries` | ||
and `download_dbs`), enter a shell session within the | ||
container on the login node (unless using the Cedar cluster specifically): | ||
- Enter the shell session: | ||
```bash | ||
APPTAINER_BIND='' | ||
apptainer shell -C -B $PWD:/root --pwd /root pixi.sif | ||
``` | ||
- Now you are in an environment where all the AMOEBAE dependencies are | ||
installed. You can run `snakemake` commands as described in the [workflow | ||
protocol](./workflow_protocol.md), without the need to prefix with `pixi run `. | ||
- Run the specific rules in the workflow (if/when needed as part of the workflow protocol): | ||
```bash | ||
snakemake --cores 1 download_queries | ||
snakemake --cores 1 download_dbs | ||
``` | ||
- Exit the shell session: | ||
```bash | ||
exit | ||
``` | ||
|
||
4. Otherwise, start an interactive session, so that your analysis will be run on a compute | ||
node. For example, like this (see [DRAC documentation](https://docs.alliancecan.ca/wiki/Running_jobs#Interactive_jobs)): | ||
```bash | ||
salloc --time=1:0:0 --mem-per-cpu=16G --ntasks=1 --account=def-leppard | ||
``` | ||
|
||
5. Then, enter a shell session within the container: | ||
```bash | ||
module load apptainer | ||
APPTAINER_BIND='' | ||
apptainer shell -C -B $PWD:/root --pwd /root pixi.sif | ||
``` | ||
|
||
6. Now run the remaining workflow steps, as described in the workflow protocol. | ||
```bash | ||
snakemake get_ref_seqs | ||
... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Bootstrap: docker | ||
From: ghcr.io/prefix-dev/pixi:latest | ||
|
||
%post | ||
cd /root | ||
cp pixi.toml pixi.lock / | ||
cd / | ||
pixi install --locked --environment default | ||
pixi global install -c conda-forge -c bioconda blast muscle=3.8 exonerate | ||
|
||
%environment | ||
export PIXI_HOME=/ | ||
export PIXI_CACHE_DIR=/.cache/rattler/cache | ||
export RATTLER_AUTH_FILE=/.rattler/credentials.json | ||
cd / && source <(pixi shell-hook --environment default) |