qiime diversity beta-group-significance

I'm trying to run beta group significance using the code below in qiime2 2022.2

qiime diversity beta-group-significance
--i-distance-matrix core-metrics-results/unweighted_unifrac_distance_matrix.qza
--m-metadata-file sample-metadata.txt
--m-metadata-column depth
--o-visualization core-metrics-results/unweighted-unifrac-depth-significance.qzv
--p-pairwise

however, I'm continuously getting the error below :disappointed_relieved:

Traceback (most recent call last):
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in beta_group_significance
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 453, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_diversity/_beta/_visualizer.py", line 170, in beta_group_significance
pairs_summary = pd.DataFrame(columns=['SubjectID1', 'SubjectID2', 'Group1',
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/pandas/core/frame.py", line 411, in init
mgr = init_dict(data, index, columns, dtype=dtype)
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/pandas/core/internals/construction.py", line 242, in init_dict
val = construct_1d_arraylike_from_scalar(np.nan, len(index), nan_dtype)
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/pandas/core/dtypes/cast.py", line 1221, in construct_1d_arraylike_from_scalar
dtype = dtype.dtype
AttributeError: type object 'object' has no attribute 'dtype'

Plugin error from diversity:

type object 'object' has no attribute 'dtype'

See above for debug info.

Hi @tafara_bute,

That's pretty strange. Could you run this command in your environment:

conda list | grep "pandas\|numpy\|scipy"

and also:

qiime info

Thanks!

1 Like

Thanks @ebolyen

Hi @tafara_bute,

Thanks you for the screenshots! It looks like your installation of pandas differs as it should be coming from conda-forge instead of pypi. I suspect this is where the incompatibility is coming from, there's a version mismatch that pypi wasn't concerned with, since it isn't aware of conda and our version requirements.

The easiest thing is probably to reinstall your environment (and will prevent any similar issues, as you may have other unexpected versions), but you could also probably get things working by reinstalling this version of pandas (in your QIIME 2 environment):

conda install pandas=1.2.5

Generally, you'll want to avoid installing different versions of packages as this can break your QIIME 2 environment, but I imagine you needed some other software to work.

I would recommend creating additional environments with new names whenever this situation comes up in the future, that way you always have at least your original QIIME 2 env which should work.

1 Like

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