Trouble with ancombc plugin - pandas index name error

Hi All,

I am working with qiime2-2021.11. I am having a lot of trouble with ancom-bc. I believe I installed everything correctly. However, when I run the following code, I keep getting an error.

qiime ancombc ancombc \

--i-table unrarefied-table.qza \
--m-metadata-file MappingFile.txt \
--p-formula "Period" \
--o-differentials differentials.qza

Plugin error from ancombc:

pandas index name (Index.name) must be one of the following values, not None:

Case-insensitive: 'feature id', 'feature-id', 'featureid', 'id', 'sample id', 'sample-id', 'sampleid'

Case-sensitive: '#OTU ID', '#OTUID', '#Sample ID', '#SampleID', 'sample_name'

Debug info has been saved to /var/folders/zy/9lhn8mvd7pj140mbwmc9wh5xzs6f2n/T/qiime2-q2cli-err-2skemppy.log

I exported the qza file into a txt file and made sure that #SampleID was in the first cell. I am not sure what could be the problem. Any help would greatly be appreciated!

Sterling

Hi @SterlingWright2016,

Thanks for providing those details!

Can you please provide the following:

  • How you installed QIIME 2 (e.g. Virtualbox, conda, etc.)
  • What is the exact error message, if applicable? If you didn't run the command with the --verbose flag, please re-run and copy-and-paste the results.

Thanks! :lizard:

2 Likes

Hello, I experienced the same error, and I would like to provide some details:

Qiime2 installation:
VirtualBox Qiime2-2021.2
used qiime2-2021.2, but also installed and tested most recent release qiime2-2022.2 in VB

Additional:
Installed (as root) CMAKE and nlopt from Overview - NLopt Documentation (otherwise BiocManager::install("ANCOMBC") failes at nloptr and ancombc with non-zero exit warnings)

In activated q2 environemnt
R, then local install of ancombc as shown in GitHub - mortonjt/q2-ancombc: qiime2 plugin for ANCOMBC

Finally, installed the q2 plugin with pip

Run ancombc as shown in attached files. The log file showed two tidyverse conflicts.

Comments to the data used: The frequency table, metadata file and metadata colums work without problems with the original qiime composition add-pseudocount and qiime composition ancom;

I would appreciate getting some advice how to get ancombc running.
Best,
ancombc.txt (3.7 KB)

Hi @lizgehret,

Thank you for helping me on this front. Below is the code that I am running. I installed QIIME2 via conda.

qiime ancombc ancombc \

--i-table unrarefied.qza \
--m-metadata-file MappingFile.txt \
--p-formula "Period" \
--verbose \
--o-differentials differentials.qza

Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_ancombc.R ./input.biom.tsv ./input.map.txt Period holm 0.9 1000 Period TRUE TRUE 1e-05 100 TRUE 0.05 FALSE ./output.summary.txt

R version 4.0.5 (2021-03-31)
── Attaching packages ─────────────────────────────────────────────────────────────── tidyverse 1.3.1 ──
:heavy_check_mark: ggplot2 3.3.5 :heavy_check_mark: purrr 0.3.4
:heavy_check_mark: tibble 3.1.6 :heavy_check_mark: dplyr 1.0.8
:heavy_check_mark: tidyr 1.2.0 :heavy_check_mark: stringr 1.4.0
:heavy_check_mark: readr 2.1.2 :heavy_check_mark: forcats 0.5.1
── Conflicts ────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
:heavy_multiplication_x: dplyr::filter() masks stats::filter()
:heavy_multiplication_x: dplyr::lag() masks stats::lag()
Traceback (most recent call last):
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in ancombc
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 418, in callable_executor
artifact = qiime2.sdk.Artifact._from_view(
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/result.py", line 305, in _from_view
result = transformation(view, validate_level)
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/core/transform.py", line 70, in transformation
new_view = transformer(view)
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/core/transform.py", line 221, in wrapped
file_view = transformer(view)
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_types/feature_data/_transformer.py", line 645, in _224
qiime2.Metadata(data).save(str(ff))
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/metadata/metadata.py", line 405, in init
super().init(dataframe.index)
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/metadata/metadata.py", line 96, in init
self._assert_valid_id_header(id_header)
File "/Users/svw5689/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/metadata/metadata.py", line 134, in _assert_valid_id_header
raise ValueError(
ValueError: pandas index name (Index.name) must be one of the following values, not None:

Case-insensitive: 'feature id', 'feature-id', 'featureid', 'id', 'sample id', 'sample-id', 'sampleid'

Case-sensitive: '#OTU ID', '#OTUID', '#Sample ID', '#SampleID', 'sample_name'

Plugin error from ancombc:

pandas index name (Index.name) must be one of the following values, not None:

Case-insensitive: 'feature id', 'feature-id', 'featureid', 'id', 'sample id', 'sample-id', 'sampleid'

Case-sensitive: '#OTU ID', '#OTUID', '#Sample ID', '#SampleID', 'sample_name'

See above for debug info.

I hope this helps.

Sincerely,
Sterling

Hi @SterlingWright2016 and @arwqiime,

It looks like this is actually a known issue with the ANCOM-BC plugin, which is still in development at this time. @mortonjt is spear-heading the QIIME 2 wrapper for ANCOM-BC, so he should be able to share further updates as they become available!

Cheers :lizard:

2 Likes

@lizgehret thank you so much!

2 Likes

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