qiime diversity beta-group-significance failing

Hi QIIME2 team,
The qiime diversity beta-group-significance is currently failing. I ran this notebook a few years back and was trying to reproduce the analysis with the same data inputs, but now I am not able to get an output for this code. I am happy to provide the data inputs as well. I found forum discussions about beta-group-significance but have not found this error that I am encountering described on the forum.

%%bash
source activate qiime2-2020.2

qiime diversity beta-group-significance
--i-distance-matrix Normalised_TIC_20231218_1220_BC.qza
--m-metadata-file StromatoliteTissue_Pos_metadata_022420_submergedcolumn_1220.txt
--m-metadata-column ATTRIBUTE_submerged
--o-visualization Normalised_TIC_20231218_BC-significance.qzv

I am getting the following error:

Plugin error from diversity:

Value must be a nonnegative integer or None

Debug info has been saved to /var/folders/mk/s89dd3_s1g3df6ctgmxs75r80000gn/T/qiime2-q2cli-err-ywvkmxeu.log

Here is the debug info:
Traceback (most recent call last):
File "/opt/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/commands.py", line 329, in call
results = action(**arguments)
File "", line 2, in beta_group_significance
File "/opt/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/qiime2/sdk/action.py", line 244, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/opt/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/qiime2/sdk/action.py", line 452, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/opt/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2_diversity/_beta/_visualizer.py", line 203, in beta_group_significance
result_html = q2templates.df_to_html(result.to_frame())
File "/opt/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2templates/util.py", line 45, in df_to_html
with pd.option_context('display.max_colwidth', -1):
File "/opt/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/pandas/_config/config.py", line 444, in enter
_set_option(pat, val, silent=True)
File "/opt/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/pandas/_config/config.py", line 160, in _set_option
o.validator(v)
File "/opt/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/pandas/_config/config.py", line 882, in is_nonnegative_int
raise ValueError(msg)
ValueError: Value must be a nonnegative integer or None

Hi @Allegra_Aron,

This is a slightly bizarre theory, but I think this error has happened to me when my sample IDs in my metadata and IDs in the distance matrix either didnt line up perfectly or didnt line up at all. The underlying error I think has to do with a disconnect in the distance matrix and the scikit-bio permanova command under the hood.

So, I would cross check your metadata and your distance matrix, maybe try filtering your distance matrix against your metadata and making a heatmap to summarize those results (I think this should be possible?)

Best,
Justine

1 Like

Hi Justine,
That is a helpful theory to test out and would make sense ... any advice into how to do this cross-check or filtering? If not, no problem ... I'll continue looking through documentation and the forum.
Thanks!

Hi @Allegra_Aron,

There's a function, filter-distance-matrix in the diversity plugin. I'd maybe start there and see if you can filter the data. I personally tend ot use a mix of the python API and the underlying scikit-bio libraries here, so I'm not sure my other checks would help.

Best,
Justine

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