Plugin error from alpha diversity

I was analyzing alpha diversity of my data through following command:
qiime diversity alpha --i-table feature-table-otu-input.qza --p-metric ace --o-alpha-diversity observed_otus_vector_alpha_ace_evenness.qza
Further I am getting following error. I have also done the Chao1 but I am curious how to resolve this Ace metric issue.

Plugin error from diversity:
The only rare OTUs are singletons, so the ACE metric is undefined. EstimateS suggests using bias-corrected Chao1 instead.

Hi @deepak,

Can you re-run your command with the --verbose flag and copy/paste the entire traceback in your response? This will help us to better determine where exactly this error is coming from. Thanks! :lizard:

Hi, following is the log of the command:

(qiime2-2023.5) dve@CRB:/mnt/f/c/alpha$ qiime diversity alpha --i-table motu-table.qza --p-metric ace --o-alpha-diversity observed_otus_vector_alpha_ace_evenness.qza --verbose
Traceback (most recent call last):
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/commands.py", line 473, in call
results = action(**arguments)
File "", line 2, in alpha
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 274, in bound_callable
outputs = self.callable_executor(
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 590, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_diversity/_alpha/_pipeline.py", line 28, in alpha
vector, = action(table=table, metric=metric)
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/context.py", line 140, in deferred_action
return action_obj._bind(
File "", line 2, in alpha_passthrough
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 274, in bound_callable
outputs = self.callable_executor(
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 509, in callable_executor
output_views = self._callable(**view_args)
File "", line 2, in alpha_passthrough
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 69, in _disallow_empty_tables
return wrapped_function(*args, **kwargs)
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_diversity_lib/alpha.py", line 108, in alpha_passthrough
results.append(skbio.diversity.alpha_diversity(metric=metric,
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/skbio/diversity/_driver.py", line 181, in alpha_diversity
results = [metric(c, **kwargs) for c in counts]
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/skbio/diversity/_driver.py", line 181, in
results = [metric(c, **kwargs) for c in counts]
File "/home/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/skbio/diversity/alpha/_ace.py", line 93, in ace
raise ValueError("The only rare OTUs are singletons, so the ACE "
ValueError: The only rare OTUs are singletons, so the ACE metric is undefined. EstimateS suggests using bias-corrected Chao1 instead.

Plugin error from diversity:

The only rare OTUs are singletons, so the ACE metric is undefined. EstimateS suggests using bias-corrected Chao1 instead.

See above for debug info.

Hi @deepak,

Thanks for sharing that traceback! It looks like this is coming directly from the diversity package within scikitbio - I've never seen this error before, but based on what it says it seems like you might not be able to use this metric on your data.

Can you tell us a bit more about your data and why you chose this specific metric? This might better inform your next steps and why this didn't work for your analysis.

Hi, thank you so much @lizgehret for prompt response

I analyzed my shotgun sequencing data through mOTU plugin and performed downstream analysis. Here I tried to analyze alpha diversity in multiple ways so that I can compare the outputs. I analyzed all the methods for alpha diversity but only this one was giving this error.
I have results of other methods, but I was curious why this error was coming.

Hi @deepak,

Thanks for sharing that context!

So for full disclosure, I'm not super familiar with the ACE metric in particular, but I did find this forum post which discusses how the ACE metric (and other similar diversity metrics) are calculated, along with their limitations. Hopefully this will help contextualize this error a bit, based on the dataset you're working with. Cheers :lizard: