q2-composition ANCOMBC Error

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) and here. 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.

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! :lizard:

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.

Then after that, I followed this 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

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

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!

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!

1 Like

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! :wave: