# Singularity qiime2 container - qiime command not found

**URL:** <https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044>\
**Category:** Ask for help\
**Tags:** nextflow, hpc\
**Created:** [August 1, 2024, 11:43pm UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044 "2024-08-01T23:43:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![saif\_s](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/saif_s/32/895_2.png) [@saif\_s](https://community.seqera.io/u/saif_s)\
**Post date:** [August 1, 2024, 11:43pm UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/1 "2024-08-01T23:43:32Z")

</div>

Hello,  
I have tried testing multiple qiime2-core and qiime2-amplicon images using singularity. Everytime I try to test my nextflow script it ends up not recognizing qiime command (not finding qiime in my bash script). Am I doing something wrong?

> **[New Docker builds on qury.io for 2024.2](https://forum.qiime2.org/t/new-docker-builds-on-qury-io-for-2024-2/29427)**
>
> Looks like quay.io does not have 2024.2 published. Can someone bump that? Thanks!

[https://hub.docker.com/r/qiime2/core](https://hub.docker.com/r/qiime2/core)

```auto
#!/usr/bin/env nextflow
process test {
	debug true
	label 'qiime'
        script:
        """
        qiime --info
        """

workflow {
	test()
}

```

config file

```auto
profiles{
	singularity{
    	singularity.enabled = true
    	process{
    	process.executor = 'slurm'
    	withLabel: qiime {
        	cpus = 10
        	memory = 100.GB
        	container = '/uufs/chpc.utah.edu/common/home/kapheim-group2/Sief/nextflow_script/singularity/amplicon_latest.sif'
    	}
    	}
	}
	conda{
    	conda.enabled = true
    	process{
        	process.executor = 'slurm'
        	withLabel: pandasenv{
            	cpus = 10
            	memory = 50.GB
            	conda = '/uufs/chpc.utah.edu/common/home/u6060645/software/pkg/miniconda3/envs/pandaenv'
        	}
    	}
	}
}

```

---

<div class="post-metadata">

**Author:** ![mribeirodantas](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mribeirodantas/32/235_2.png) [@mribeirodantas](https://community.seqera.io/u/mribeirodantas)\
**Post date:** [August 2, 2024, 1:53am UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/2 "2024-08-02T01:53:02Z")

</div>

Hi @saif_s,

There’s a missing `}` in your Nextflow script. Can you please share the SIF image so that I can try to replicate it here on my side? You confirm that you set the `-profile` to singularity?

Next time, please make sure you share

- **the command line you used to run your pipeline** e.g. `nextflow run main.nf -profile singularity`
- **the exact output error you got**
- The `.nextflow.log` file

---

<div class="post-metadata">

**Author:** ![saif\_s](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/saif_s/32/895_2.png) [@saif\_s](https://community.seqera.io/u/saif_s)\
**Post date:** [August 2, 2024, 4:19am UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/3 "2024-08-02T04:19:17Z")

</div>

Hi Marcel,

I will make sure to include a proper output profile next time. Regarding the **command line** here is exactly what I inputted  
`[u6060645@notch068:nextflow_script]$ nextflow run test.nf -profile singularity`

the .command.log  
`....long directory removed/nextflow_script/work/4e/41bcb4aaf2f8ff510966c7fe489dc6/.command.sh: line 2: qiime: command not found`  
Command Exist Status: 127

the SIF image, please read below:

1. I have tried using multiple images (the ones that I will link below are the ones that I have tried and they’ve given me exactly the same error!
2. The way I got the SIF image is by using `singularity pull dock://<image code or link>`
3. [https://hub.docker.com/r/qiime2/core](https://hub.docker.com/r/qiime2/core) `singularity pull dock://qiime2/core`
4. I also tried `singularity pull docker://quay.io/qiime2/amplicon:2024.5`  
as per this guide [Installing QIIME 2 using Docker — QIIME 2 2024.5.0 documentation](https://docs.qiime2.org/2024.5/install/virtual/docker/)

---

<div class="post-metadata">

**Author:** ![saif\_s](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/saif_s/32/895_2.png) [@saif\_s](https://community.seqera.io/u/saif_s)\
**Post date:** [August 2, 2024, 6:18am UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/4 "2024-08-02T06:18:02Z")

</div>

It’s also worth mentioning that I got the same error even with the latest version of qiime2 as per the forum discussion here:

> **[Qiime2 installation via Docker container through singularity not working](https://forum.qiime2.org/t/qiime2-installation-via-docker-container-through-singularity-not-working/27926)**
>
> Hello there! I am typing because I was trying to retrieve the new Qiime2 version but brutally failed 😅 I don't have Docker on my device, but I have singularity, therefore I go with: singularity build qiime2\_2023.9...

and there repo here

> **[Quay](https://quay.io/repository/qiime2/amplicon)**
>
> Quay is the best place to build, store, and distribute your containers. Public repositories are always free.

`singularity build qiime2_2024.5 docker://quay.io/qiime2/amplicon:2024.5`

---

<div class="post-metadata">

**Author:** ![mribeirodantas](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mribeirodantas/32/235_2.png) [@mribeirodantas](https://community.seqera.io/u/mribeirodantas)\
**Post date:** [August 2, 2024, 1:27pm UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/5 "2024-08-02T13:27:50Z")

</div>

Can’t reproduce. It works fine in Gitpod. You can try yourself [here](http://gitpod.io/#https://github.com/nextflow-io/training).

My `main.nf`:

```auto
#!/usr/bin/env nextflow
process test {
	debug true
	label 'qiime'
        script:
        """
        qiime --help
        """
}
workflow {
	test()
}

```

My `nextflow.config`

```auto
profiles{
	singularity{
    	singularity.enabled = true
    	process{
    	process.executor = 'slurm'
    	withLabel: qiime {
        	cpus = 10
        	memory = 1.GB
        	container = '/workspace/gitpod/nf-training/core_latest.sif'
    	}
    	}
	}
	conda{
    	conda.enabled = true
    	process{
        	process.executor = 'slurm'
        	withLabel: pandasenv{
            	cpus = 10
            	memory = 50.GB
            	conda = '/uufs/chpc.utah.edu/common/home/u6060645/software/pkg/miniconda3/envs/pandaenv'
        	}
    	}
	}
}

```

Built/pulled the singularity image with:

```auto
singularity pull docker://qiime2/core

```

Run the pipeline with

```auto
nextflow run main.nf -profile singularity

```

The issue is not with Nextflow, the pipeline code or Singularity. It’s probably related to something in our machine outside the scope of Nextflow.

---

<div class="post-metadata">

**Author:** ![saif\_s](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/saif_s/32/895_2.png) [@saif\_s](https://community.seqera.io/u/saif_s)\
**Post date:** [August 2, 2024, 6:42pm UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/6 "2024-08-02T18:42:49Z")

</div>

Thanks for looking into it. I found a workaround for now. I built another conda sub-process for qiime2 using their provided yml. That fixed it for now. I will troubleshoot this problem further to see what the problem is.

---

<div class="post-metadata">

**Author:** ![saif\_s](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/saif_s/32/895_2.png) [@saif\_s](https://community.seqera.io/u/saif_s)\
**Post date:** [August 2, 2024, 9:38pm UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/7 "2024-08-02T21:38:52Z")

</div>

I just tested what you did and it worked. I believe (possibly) that the problem was with how I handled it with out HPCP. You need to first load singularity module before you can use it in nextflow. I made sure to load it first, and now it did work following the exact steps you provided.

Thank you!

---

<div class="post-metadata">

**Author:** ![saif\_s](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/saif_s/32/895_2.png) [@saif\_s](https://community.seqera.io/u/saif_s)\
**Post date:** [August 2, 2024, 9:44pm UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/8 "2024-08-02T21:44:18Z")

</div>

> [@mribeirodantas](#):
>
> ` qiime --help`

I want to drop one more question if that’s okay.

My config file had process.container, between that and not loading module singularity, one or both was causing that error. Testing without module singularity loaded causes an error, and with loading it the error is gone (container = ‘’ is used), and with singularity loaded but using process.container I get the same error.

I can’t find in the document a clear difference between container vs process.container. Why was using process.container causing it not to identify the sif image?

---

<div class="post-metadata">

**Author:** ![saif\_s](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/saif_s/32/895_2.png) [@saif\_s](https://community.seqera.io/u/saif_s)\
**Post date:** [August 3, 2024, 12:23am UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/9 "2024-08-03T00:23:47Z")

</div>

After couple of tries and little reading. I think I understand. Process.config is not a process-specific option, it’s a global setting that goes into the main profile itself, so above singularity and conda. While conda=‘’ is a process-specific directive, that directs the processes to certain images.

That fixes the problem along with module loading singularity in home directory.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/system/32/2402_2.png) [@system](https://community.seqera.io/u/system)\
**Post date:** [August 10, 2024, 12:24am UTC](https://community.seqera.io/t/singularity-qiime2-container-qiime-command-not-found/1044/10 "2024-08-10T00:24:21Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
