From f27c7d39599be9d90e54e0d64a1e412580555d11 Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Wed, 1 May 2024 12:52:07 -0500 Subject: [PATCH] Resolving the `'Illegal option --'` error --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 9ff9b7f..044840f 100644 --- a/README.md +++ b/README.md @@ -341,6 +341,36 @@ GUIX_PACKAGE_PATH=. guix package -i pggb A nextflow DSL2 port of `pggb` is developed by the [nf-core](https://nf-co.re/) community. See [nf-core/pangenome](https://github.com/nf-core/pangenome) for more details. +## issues + +### Resolving the `'Illegal option --'` error with Singularity on HPC (thanks to Rachel Rusholme Pilcher) + +When running a Singularity container on an Alma Linux node in HPC, you may encounter an `'Illegal option --'` error. This issue arises due to an incompatibility between the Singularity container and the Alma Linux environment. + +The `which` function from the Alma Linux 9 host machine is inherited by the Singularity container during execution. However, the container's Debian operating system may not be compatible with this function, leading to the error. Modifying the container's definition file (`.def`) alone is insufficient to resolve this issue persistently. + +To address this problem, you have two options: + +1. **Unset the `which` function before running the container:** + + Before executing your Singularity container, run the following command on the host machine: + + ``` + unset -f which + ``` + + This command unsets the `which` function, preventing it from being inherited by the container. + +2. **Use the `-e` flag when running the container:** + + Execute your Singularity container using the `-e` flag: + + ``` + singularity exec -e ... + ``` + + The `-e` flag prevents any host environment variables and functions from being inherited by the container. + ## reporting ### MultiQC