qiime gneiss ols-regression error

Hi I have three samples and i did the following analysis in gnesis artifacts
iime gneiss correlation-clustering
–i-table table.qza
–o-clustering hierarchy.qza
In the tutorial its mentioned taxa.qza will be output file but when i run this command only hierarchy.qza was created no taxa.qza

qiime gneiss gradient-clustering
–i-table table.qza
–m-gradient-file metadata.tsv
–m-gradient-column Temperature
–o-clustering gradient-hierarchy.qza

qiime gneiss ilr-hierarchical
–i-table table.qza
–i-tree hierarchy.qza
–o-balances balances.qza
and then i tried to do regression using
qiime gneiss ols-regression
–p-formula “SampleType+Temperature+pH+Salinity+TOC+DOC+DO+Nitrate+Ammonium+Phosphorus”
–i-table balances.qza
–i-tree hierarchy.qza
–m-metadata-file metadata.tsv
–o-visualization regression_summary.qzv command but it shows error gin error from gneiss:

cannot convert float NaN to integer

Debug info has been saved to /tmp/qiime2-q2cli-err-whiodya8.log
/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/gneiss/regression/_ols.py:192: RuntimeWarning: invalid value encountered in sqrt
bse = np.sqrt(np.outer(np.diag(cov), mse))
/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:877: RuntimeWarning: invalid value encountered in greater
return (self.a < x) & (x < self.b)
/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:877: RuntimeWarning: invalid value encountered in less
return (self.a < x) & (x < self.b)
/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1831: RuntimeWarning: invalid value encountered in less_equal
cond2 = cond0 & (x <= self.a)
/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/gneiss/regression/_ols.py:193: RuntimeWarning: invalid value encountered in true_divide
tvalues = np.divide(beta, bse)
/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/gneiss/regression/_ols.py:206: RuntimeWarning: invalid value encountered in double_scalars
self._r2 = 1 - ((resid2).values.sum() / (sst2).values.sum())
/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/statsmodels/stats/multitest.py:320: RuntimeWarning: invalid value encountered in less_equal
reject = pvals_sorted <= ecdffactor*alpha
Traceback (most recent call last):
File “/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/q2cli/commands.py”, line 311, in call
results = action(**arguments)
File “</home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/decorator.py:decorator-gen-278>”, line 2, in ols_regression
File “/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 427, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File “/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/q2_gneiss/regression/_regression.py”, line 34, in ols_regression
ols_summary(output_dir, res, tree)
File “/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/gneiss/plot/_regression_plot.py”, line 302, in ols_summary
hm_p = _heatmap_summary(model.pvalues.T, model.coefficients().T)
File “/home/osboxes/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/gneiss/plot/_regression_plot.py”, line 186, in _heatmap_summary
ind = int(np.floor((x - _min) / (_max - _min) * (N - 1)))
ValueError: cannot convert float NaN to integer

Help me in this issue
Thanks for your valuable time

Good morning Balamurugan,

I’m not 100% sure what’s causing this issue, but this error gives us a good clue.

cannot convert float NaN to integer

I’m willing to bet that one of your metadata columns, say pH or Temperature, is missing some values. These ‘empty’ values are read in a NaN (Not a Number) by python, and this is making this error.

Can you check your metadata.tsv file for missing values and let me know what you find? Does the command work when running only a few types at once, like just
--p-formula "SampleType+Temperature"

Colin

Hai Colinbrislawn
Thanks for your replay, all the values in metadata are not empty , herewith i have attached the metadata so plz check it.

metadata.tsv (554 Bytes) Also check this
qiime gneiss correlation-clustering
–i-table table.qza
–o-clustering hierarchy.qza
In the tutorial its mentioned taxa.qza will be created as output file but when i run this command only hierarchy.qza was no taxa.qza created.

Thanks for posting your metadata.tsv file! I think I found the problem:

  1. Some of your metadata is 100% correlated with each other
    The formula DOC+TOC doesn’t make sense, as these already 100% correlate with each other.
  2. You have three samples.
    Trying to explain variation in 10 environmental gradients using three samples is very hard, maybe impossible! Do you have more samples you can add? Which of these gradients do you think is most important to study?

Colin

1 Like