# q2-composition ANCOMBC Error

**URL:** https://forum.qiime2.org/t/q2-composition-ancombc-error/31271
**Category:** Technical Support
**Created:** [August 28, 2024, 7:16pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271 "2024-08-28T19:16:15Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Mahasti](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@Mahasti](https://forum.qiime2.org/u/Mahasti)
#### Post date: [August 28, 2024, 7:16pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/1 "2024-08-28T19:16:15Z")

</div>

Hi qiime2 team,

I'm trying to run ANCOMBC on my data through the q2-composition plugin. This is through WSL in a qiime2-2024.5 environment. This was all set up within the last month and I followed the installation guide for setting this up, nothing else has been installed. This looks to be the same error as mentioned in this [post] ([ANCOM-BC plugin error](https://forum.qiime2.org/t/ancom-bc-plugin-error/25884)) and [here](https://forum.qiime2.org/t/ancombc-in-r-return-code-1/30786). After troubleshooting by making sure my .condarc file was blank which did not fix the error, I tried the moving pictures tutorial data to see if it could be a problem with my personal metadata file and I received the same error.

Is there anything I can do to fix this error? The latter forum post suggests deleting miniconda and installing everything again. I don't know if this would work for me since everything is a recent install. More details below.

Thanks in advance!

The command:

qiime composition ancombc   
--i-table gut-table.qza   
--m-metadata-file sample-metadata.tsv   
--p-formula 'subject'   
--o-differentials ancombc-subject.qza   
--verbose

I'm receiving an error that says the following:

```
  Plugin error from composition:
  
    An error was encountered while running ANCOM-BC in R (return code 1), please inspect 
    stdout and stderr to learn more.
  
  See above for debug info.

```

Verbose gets me:

Command: run\_ancombc.R --inp\_abundances\_path /tmp/tmpvnk28nv4/input.biom.tsv --inp\_metadata\_path /tmp/tmpvnk28nv4/input.map.txt --md\_column\_types {"barcode-sequence": "categorical", "body-site": "categorical", "year": "numeric", "month": "numeric", "day": "numeric", "subject": "categorical", "reported-antibiotic-usage": "categorical", "days-since-experiment-start": "numeric"} --formula subject --p\_adj\_method holm --prv\_cut 0.1 --lib\_cut 0 --reference\_levels ['subject::subject-1'] --tol 1e-05 --max\_iter 100 --conserve False --alpha 0.05 --output\_loaf /tmp/q2-DataLoafPackageDirFmt-e67rpj0b

Error: package or namespace load failed for ‘phyloseq’ in dyn.load(file, DLLpath = DLLpath, ...):  
unable to load shared object '/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/R/library/ade4/libs/ade4.so':  
/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/R/bin/exec/../../lib/../.././libstdc++.so.6: version `CXXABI\_1.3.15' not found (required by /home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/R/library/ade4/libs/ade4.so)  
8: stop(msg, call. = FALSE, domain = NA)  
7: value[3L]  
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])  
5: tryCatchList(expr, classes, parentenv, handlers)  
4: tryCatch({  
attr(package, "LibPath") \<- which.lib.loc  
ns \<- loadNamespace(package, lib.loc)  
env \<- attachNamespace(ns, pos = pos, deps, exclude, include.only)  
}, error = function(e) {  
P \<- if (!is.null(cc \<- conditionCall(e)))  
paste(" in", deparse(cc)[1L])  
else ""  
msg \<- gettextf("package or namespace load failed for %s%s:\n %s",  
sQuote(package), P, conditionMessage(e))  
if (logical.return && !quietly)  
message(paste("Error:", msg), domain = NA)  
else stop(msg, call. = FALSE, domain = NA)  
})  
3: library(phyloseq)  
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,  
classes)) tryInvokeRestart("muffleWarning"))  
1: suppressWarnings(library(phyloseq))  
Traceback (most recent call last):  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/q2\_composition/\_ancombc.py", line 255, in \_ancombc  
run\_commands([cmd])  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/q2\_composition/\_ancombc.py", line 32, in run\_commands  
subprocess.run(cmd, check=True)  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/subprocess.py", line 528, in run  
raise CalledProcessError(retcode, process.args,  
subprocess.CalledProcessError: Command '['run\_ancombc.R', '--inp\_abundances\_path', '/tmp/tmpvnk28nv4/input.biom.tsv', '--inp\_metadata\_path', '/tmp/tmpvnk28nv4/input.map.txt', '--md\_column\_types', '{"barcode-sequence": "categorical", "body-site": "categorical", "year": "numeric", "month": "numeric", "day": "numeric", "subject": "categorical", "reported-antibiotic-usage": "categorical", "days-since-experiment-start": "numeric"}', '--formula', 'subject', '--p\_adj\_method', 'holm', '--prv\_cut', '0.1', '--lib\_cut', '0', '--reference\_levels', "['subject::subject-1']", '--tol', '1e-05', '--max\_iter', '100', '--conserve', 'False', '--alpha', '0.05', '--output\_loaf', '/tmp/q2-DataLoafPackageDirFmt-e67rpj0b']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/q2cli/commands.py", line 520, in **call**  
results = self.\_execute\_action(  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/q2cli/commands.py", line 581, in \_execute\_action  
results = action(\*\*arguments)  
File "", line 2, in ancombc  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/sdk/action.py", line 342, in bound\_callable  
outputs = self._callable\_executor_(  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/sdk/action.py", line 576, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/q2\_composition/\_ancombc.py", line 41, in ancombc  
return \_ancombc(  
File "/home/mahasti2/miniconda3/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/q2\_composition/\_ancombc.py", line 257, in \_ancombc  
raise Exception('An error was encountered while running ANCOM-BC'  
Exception: An error was encountered while running ANCOM-BC in R (return code 1), please inspect stdout and stderr to learn more.

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [August 28, 2024, 8:18pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/2 "2024-08-28T20:18:38Z")

</div>

> [@Mahasti](#):
>
> Error: package or namespace load failed for ‘phyloseq’ in dyn.load(file, DLLpath = DLLpath, ...):

Hey @Mahasti,

Thanks for reporting this - we just became aware of this issue and are working on pinpointing the problem. Can you confirm which distribution of QIIME 2 you installed (amplicon, metagenome)? We received a report of this occurring with our current development version of the metagenome distribution, but haven't had any issues with amplicon thus far.

If possible, can you provide the exact commands you ran (or share any specifics you have) regarding your installation process? This will help us get to the bottom of this. Thanks! 🦎

---

<div class="post-metadata">

### Author: ![Mahasti](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@Mahasti](https://forum.qiime2.org/u/Mahasti)
#### Post date: [August 28, 2024, 9:15pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/3 "2024-08-28T21:15:46Z")

</div>

Hi @lizgehret,

Thank you for the quick response. I can confirm that I'm using the qiime2-amplicon-2024.5 distribution.

I first installed WSL on my Windows 10 desktop using the tutorial [here](https://learn.microsoft.com/en-us/windows/wsl/install).

Then after that, I followed [this](https://dev.to/sfpear/miniconda-in-wsl-3642) tutorial to install miniconda3.

Finally, I created a qiime 2 environment with the commands from the installation page in the qiime2 documents for Windows (via WSL).  
conda env create -n qiime2-amplicon-2024.5 --file [https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-linux-conda.yml](https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-linux-conda.yml)

I'm thinking it has something to do with miniconda now because I just created a qiime 2 environment on my Macbook and the ANCOMBC commands work for the tutorial data (I haven't tried it on my personal data yet).

The Macbook command I used to create the environment:  
conda env create -n qiime2-amplicon-2024.5 --file [https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-osx-conda.yml](https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-osx-conda.yml)

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [August 28, 2024, 11:15pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/4 "2024-08-28T23:15:56Z")

</div>



---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [August 30, 2024, 2:50pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/5 "2024-08-30T14:50:56Z")

</div>

Thank you for sharing those details @Mahasti, that's really helpful information - the other reported instance we have of this is also with the linux flavor (even though you're on a Windows, the environment file is linux-based for use with WSL). I'm going to see if I can get another linux user to replicate this, and I'll circle back with you once I have more information.

In the meantime, if it's possible to continue your analysis on your Macbook I'd recommend doing that - although I recognize that might not be ideal. We'll try to get this sorted as soon as possible; thanks for your patience!

---

<div class="post-metadata">

### Author: ![Mahasti](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@Mahasti](https://forum.qiime2.org/u/Mahasti)
#### Post date: [August 30, 2024, 5:29pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/6 "2024-08-30T17:29:14Z")

</div>

Hi @lizgehret,

Thank you for working on this. I was able to complete my analysis on my Macbook with my data and had no problems, so I am good to go.

Let me know if you need any more details from me that might help others with this same issue.

Have a great weekend!

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [August 30, 2024, 5:53pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/7 "2024-08-30T17:53:31Z")

</div>

Ah, that's great news @Mahasti! Thanks so much for following up - I'll circle back if we need any more information. Have a great weekend! 👋

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [August 30, 2024, 6:17pm UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/8 "2024-08-30T18:17:52Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [October 1, 2024, 12:18am UTC](https://forum.qiime2.org/t/q2-composition-ancombc-error/31271/9 "2024-10-01T00:18:31Z")

</div>

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