Alpha and beta diversity analysis get error: count < 0

Hi there,
my version is qiime2-2018.11

I am doing Alpha and beta diversity analysis
Here are my commands:

qiime diversity core-metricshylogenetic --i-phylogeny rooted_tree.qza --i-table adjusted_otutable.qza --p-mpling-depth 148000000000 --m-metadata-file …/raw/HFZ_MCSS_metadata.csv --outt-dir core_metrics_results

And I got an error message( I’m sure my table have no negative numbers):
Plugin error from diversity:
count < 0

Traceback (most recent call last):
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/q2cli/ commands.py”, line 274, in call
results = action(**arguments)
File “”, line 2, in core_metrics_phylogenetic
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2 /sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2 /sdk/action.py”, line 455, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/q2_div ersity/_core_metrics.py”, line 51, in core_metrics_phylogenetic
metadata=metadata, n_jobs=n_jobs)
File “”, line 2, in core_metrics
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2 /sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2 /sdk/action.py”, line 455, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/q2_div ersity/_core_metrics.py”, line 18, in core_metrics
rarefied_table, = rarefy(table=table, sampling_depth=sampling_depth)
File “”, line 2, in rarefy
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2 /sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2 /sdk/action.py”, line 362, in callable_executor
output_views = self._callable(**view_args)
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/q2_fea ture_table/_normalize.py”, line 15, in rarefy
with_replacement=with_replacement)
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/biom/t able.py”, line 2809, in subsample
_subsample(data, n, with_replacement)
File “_subsample.pyx”, line 60, in biom._subsample._subsample
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/numpy/ core/fromnumeric.py”, line 398, in repeat
return _wrapfunc(a, ‘repeat’, repeats, axis=axis)
File “/opt/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/numpy/ core/fromnumeric.py”, line 57, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
ValueError: count < 0

Thank you for your kind help!

Hi @maque4004,
This is probably your problem:

That is an extremely high sampling depth. Do you really have that many sequences in any single sample?

Yes, that’s the minimum frequency. I really don’t know what’s the problem.

Hi @maque4004,
Could you please run this command and share the output here:
qiime feature-table summarize --i-table adjusted_otutable.qza --o-visualization adjusted_otutable.qzv

1 Like

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