Error during Gneiss balance-taxonomy

Hello Folks!
I have been running into some issues using Gneiss on my own dataset.
Currently I have been using version 2-2017.9 for this work.
I can get Qiime2 to do almost everything included in the Gneiss plug-in, as shown in the tutorial, but when it comes to the step balance-taxonomy I got the following error:

Here is the comand:

Summary
qiime gneiss balance-taxonomy \
  --i-balances balances.qza \
  --i-tree hierarchy.qza \
  --i-taxonomy taxonomy.qza \
  --p-taxa-level 2 \
  --p-balance-name 'y0' \
  --m-metadata-file Metadata.tsv \
  --m-metadata-category G2 \
  --o-visualization y0_taxa_G2_summary.qzv

And here is the error, I am just copying the .log file:

Summary

Traceback (most recent call last):
File “/DATA_2/Programs/miniconda2/envs/qiime2-2017.9/lib/python3.5/site-packages/q2cli/commands.py”, line 218, in call
results = action(**arguments)
File “”, line 2, in balance_taxonomy
File “/DATA_2/Programs/miniconda2/envs/qiime2-2017.9/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 201, in callable_wrapper
output_types, provenance)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2017.9/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 393, in callable_executor
ret_val = callable(output_dir=temp_dir, **view_args)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2017.9/lib/python3.5/site-packages/q2_gneiss/plot/_plot.py”, line 53, in balance_taxonomy
num_features = taxa_df.loc[num_clade.subset()]
File “/DATA_2/Programs/miniconda2/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/indexing.py”, line 1328, in getitem
return self._getitem_axis(key, axis=0)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/indexing.py”, line 1541, in _getitem_axis
return self._getitem_iterable(key, axis=axis)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/indexing.py”, line 1081, in _getitem_iterable
self._has_valid_type(key, axis)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2017.9/lib/python3.5/site-packages/pandas/core/indexing.py”, line 1418, in has_valid_type
(key, self.obj.get_axis_name(axis)))
KeyError: "None of [frozenset({‘k__Bacteria;p__BRC1’, ‘k__Bacteria;p__Fibrobacteres’, ‘k__Archaea;’, ‘k__Bacteria;p__WS6’, ‘k__Bacteria;p__SBR1093’, ‘k__Bacteria;p__MVP-21’, 'Unassigned;’, ‘k__Bacteria;p__WS2’, ‘k__Bacteria;p__Verrucomicrobia’, ‘k__Bacteria;’, ‘k__Bacteria;p__Elusimicrobia’, ‘k__Bacteria;p__WS3’, ‘k__Bacteria;p__GN02’, ‘k__Bacteria;p__OP11’, ‘k__Bacteria;p__NKB19’, ‘k__Bacteria;p__Acidobacteria’, ‘k__Bacteria;p__OP3’, ‘k__Bacteria;p__Tenericutes’, ‘k__Archaea;p__Euryarchaeota’, ‘k__Bacteria;p__Bacteroidetes’, ‘k__Bacteria;p__Chlamydiae’, ‘k__Bacteria;p__Chloroflexi’, ‘k__Bacteria;p__Spirochaetes’, ‘k__Bacteria;p__Planctomycetes’, ‘k__Bacteria;p__Cyanobacteria’, ‘k__Bacteria;p__Firmicutes’, ‘k__Bacteria;p__GN04’, ‘k__Bacteria;p__TM6’, 'k__Bacteria;p[Caldithrix]’, 'k__Archaea;p
[Parvarchaeota]’, ‘k__Bacteria;p__OD1’, ‘k__Bacteria;p__Chlorobi’, ‘k__Archaea;p__Crenarchaeota’, ‘k__Bacteria;p__Armatimonadetes’, ‘k__Bacteria;p__TM7’, ‘k__Bacteria;p__Proteobacteria’})] are in the [index]"

Please let me know, I tried to check similar issues on the forum but I am not sure if I am doing something wrong.
Gneiss: connecting regression results with taxonomy

Thank you very much

AG

Hi @alex_biotek! You’re using a pretty old QIIME 2 release (2017.9). We aren’t able to support older releases, and it’s possible the issue has been fixed in a newer release. Can you please try upgrading to the latest release (2018.2) and see if that fixes the issue? If it doesn’t, please post back and we’ll help you sort this out.

Hi @jairideout! I have tried with the newest 2018.9 right now and it keep giving me the same error;
It might have something to do with the taxonomy file but I am not sure about how to proceed;

Here is the command I have used:

Summary
qiime gneiss balance-taxonomy \
  --i-table composition.qza \
  --i-tree hierarchy.qza \
  --i-taxonomy taxonomy.qza \
  --p-taxa-level 2 \
  --p-balance-name 'y0' \
  --m-metadata-file Metadata.tsv \
  --m-metadata-column G2 \
  --o-visualization y0_taxa_G2_summary.qzv

and here is the error.log

Summary

/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/gneiss-0.4.2-py3.5.egg/gneiss/util.py:181: FutureWarning: ‘.reindex_axis’ is deprecated and will be removed in a future version. Use ‘.reindex’ instead.
Traceback (most recent call last):
File “/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/q2cli/commands.py”, line 246, in call
results = action(**arguments)
File “”, line 2, in balance_taxonomy
File “/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 228, in bound_callable
output_types, provenance)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 424, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/q2_gneiss/plot/_plot.py”, line 67, in balance_taxonomy
num_features = taxa_df.loc[num_clade.subset()]
File “/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/pandas/core/indexing.py”, line 1373, in getitem
return self._getitem_axis(maybe_callable, axis=axis)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/pandas/core/indexing.py”, line 1616, in _getitem_axis
return self._getitem_iterable(key, axis=axis)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/pandas/core/indexing.py”, line 1115, in getitem_iterable
self.has_valid_type(key, axis)
File “/DATA_2/Programs/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/pandas/core/indexing.py”, line 1472, in has_valid_type
key=key, axis=self.obj.get_axis_name(axis)))
KeyError: "None of [frozenset({‘k__Bacteria;p__Fibrobacteres’, ‘k__Bacteria;p__NKB19’, ‘k__Bacteria;p__TM7’, ‘k__Bacteria;p__OP3’, ‘k__Bacteria;p__Firmicutes’, ‘k__Bacteria;p__Bacteroidetes’, 'k__Archaea;p
[Parvarchaeota]’, ‘k__Bacteria;p__MVP-21’, ‘k__Bacteria;p__BRC1’, ‘k__Bacteria;p__GN02’, ‘k__Bacteria;p__TM6’, ‘k__Bacteria;p__Spirochaetes’, ‘k__Archaea;p__Euryarchaeota’, ‘k__Archaea;’, ‘k__Bacteria;p__Cyanobacteria’, ‘k__Bacteria;p__Verrucomicrobia’, ‘k__Bacteria;p__Chlorobi’, ‘k__Bacteria;p__WS6’, ‘k__Bacteria;p__WS3’, 'Unassigned;’, ‘k__Bacteria;p__Elusimicrobia’, ‘k__Bacteria;p__Tenericutes’, ‘k__Bacteria;p__Chloroflexi’, ‘k__Bacteria;p__GN04’, ‘k__Bacteria;p__Proteobacteria’, ‘k__Bacteria;p__SBR1093’, ‘k__Bacteria;p__Armatimonadetes’, ‘k__Bacteria;p__Planctomycetes’, ‘k__Bacteria;p__Chlamydiae’, ‘k__Bacteria;p__OP11’, ‘k__Archaea;p__Crenarchaeota’, 'k__Bacteria;p
[Caldithrix]’, ‘k__Bacteria;__’, ‘k__Bacteria;p__WS2’, ‘k__Bacteria;p__OD1’, ‘k__Bacteria;p__Acidobacteria’})] are in the [index]"

Thank you very much for any help
Best

AG

Thanks for updating and trying the command with the new release. Sorry to hear that didn’t fix the issue! @mortonjt, can you please help debug this error with @alex_biotek?

Hi @alex_biotek, it isn’t immediately clear to me what is going on here. Do you mind if you could attach the data to reproduce this issue?

Hi @mortonjt; thanks for your reply; I have attached the file involved in this command:
-composition.qza
-hierarchy.qza
-taxonomy.qza
and the Metadata file I have used
Gneiss_error.zip (254.2 KB)

Hope you can have a clue on it; I might have done something wrong with the taxonomy but in this case I would like to figure out what went wrong.

Thank you very much
AG

Hi @alex_biotek, I noticed that you are running version 2017.9. Are you seeing the same error with version 2018.2?

Hi @mortonjt, I have tried to perform only the last step (gneiss balance-taxonomy) with the 2018.2 and it keeps giving me the same error; so I trained a new classifier and repeated the whole analyses with the 2018.2 and the result did not change. Furthermore I tried also on a different dataset but I got the same problem.
Thank you very much
Regards

AG

Hi @alex_biotek - probably should have been more clear in my last message. All of the files that you sent previously were run with qiime 2017.9 – so I wasn’t able to reproduce this error with qiime 2018.2. Do you have the files generated with qiime 2018.2 available?

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