error when visualizing ANCOM-BC results

I get an error message when I try to visualize my ANCOM-BC results with the following plugin: tabulate: View tabular output from ANCOM-BC. — QIIME 2 2022.11.1 documentation

I tried with several datasets - so I do not think that this error is really affiliated to my dataset.
I'm using qiime2-2022.11 in a conda environment.

See the error message with the --verbose flag below.
Thanks for your help!

qiime composition tabulate --i-data ancombc.qza --o-visualization ancombc.qzv --verbose
Traceback (most recent call last):
File "/home/conda/miniconda3/envs/qiime2-2022.11/lib/python3.8/site-packages/q2cli/", line 352, in call
results = action(**arguments)
File "", line 2, in tabulate
File "/home/conda/miniconda3/envs/qiime2-2022.11/lib/python3.8/site-packages/qiime2/sdk/", line 234, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/conda/miniconda3/envs/qiime2-2022.11/lib/python3.8/site-packages/qiime2/sdk/", line 443, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/home/conda/miniconda3/envs/qiime2-2022.11/lib/python3.8/site-packages/q2_composition/_dataloaf_tabulate/", line 33, in tabulate
slice_df = slice[1].view(pd.DataFrame).set_index('id')
File "/home/conda/miniconda3/envs/qiime2-2022.11/lib/python3.8/site-packages/pandas/util/", line 331, in wrapper
return func(*args, **kwargs)
File "/home/conda/miniconda3/envs/qiime2-2022.11/lib/python3.8/site-packages/pandas/core/", line 6009, in set_index
raise KeyError(f"None of {missing} are in the columns")
KeyError: "None of ['id'] are in the columns"

Plugin error from composition:

"None of ['id'] are in the columns"

See above for debug info.

Hi @Mechah,

Thanks for reaching out! :nerd_face:

We just discovered this bug on our end as well - the ANCOM-BC R package that we have wrapped into q2-composition had some slight changes made to the output after we built it, which caused this error. We have a fix in place (pull request can be found here), and will have it shipped out in a patch release next week! We will make an announcement on the forum once this has been updated.

In the meantime - if you'd like to examine your ANCOM-BC results, you can use the following steps to do so (using your ancombc.qza file as an example):

First making sure you are sitting in the same directory that your ancombc results are in.

unzip ancombc.qza

This will inflate the zip file as a new directory with a name that has a bunch of letters and numbers - something similar to this:


You'll then cd into this directory, and then into the data subdirectory. This subdirectory contains all of the outputs that we use to construct the visualization (log-fold change, standard error, W-scores, q-values, and p-values). You'll see the following files:


You can disregard the datapackage.json file, as that doesn't contain helpful user-facing information. You can open up the rest of these .csv files in Excel, or any text editor of your choice.

Hope this helps! Thanks for your patience while we get this bug fix shipped out :slightly_smiling_face:

1 Like

Great that there will be a fix of this bug soon.
Till then I'll just work with the export / unzip function to check my outputs.