q2-health-index: cannot do slice indexing on <class 'pandas.core.indexes.base.Index'> with these indexers [0.0] of <class 'numpy.float64'>

Hello qiime users!

I'm testing the q2-health-index plugin, but I didn't find an example or a tutorial. I tried to run this command:

qiime health-index calculate-gmhi --i-table table.qza --m-metadata-file metadata-file.tsv --p-healthy-states saudavel --p-non-healthy-states rest --p-healthy-column condition --o-gmhi-results gmhi_output --o-gmhi-plot gmhi_plot --verbose

I noticed some errors. The last one was this:

"Plugin error from health-index:
cannot do slice indexing on <class 'pandas.core.indexes.base.Index'> with these indexers [0.0] of <class 'numpy.float64'>
See above for debug info."

Has anyone used this metric/plugin and faced this error?

Hi @rraf ! Welcome to the forum.

Thanks for posting – I have never heard of this plugin before and it is not listed in the QIIME 2 library, where community developed plugins are listed, so thanks for putting this on our radar.

The github repository for this plugin does not list very specific info, including where to get support, but I recommend posting an issue on their to get support — the authors are welcome to support your question here, but I am just guessing that they are more likely to monitor their Github than this forum. :man_shrugging:

Good luck!


Hi @Nicholas_Bokulich , thank you very much for the reply!
I will try to get in touch with the developer through github. I would like to ask if you know another q2-plugin or alternative to calculate the GMHI index (https://www.nature.com/articles/s41467-020-18476-8)??

I do not — this index looks very specific to that paper (where it is newly defined). The code is shared in that paper so that is the first place that I would look.

Good luck!

1 Like

Hello @rraf! Thank you very much for your interest in the q2-health-index plugin. The plugin is still under development, so we haven’t decided yet to share it with the community. Currently, only one action is implemented (i.e. calculate-gmhi) which calculates health index following the original algorithm from the paper you’ve mentioned (A predictive index for health status using species-level gut microbiome profiling | Nature Communications). The error which you encountered is probably caused by some incompatibilities between table.qza and metadata file or not sufficient number of records there. Could you share your input data with us (or write to me directly: pawel.szczerbiak[at]uj.edu.pl) so we can reproduce your output?

Also, if you have any ideas what kind of other functionalities (actions) might be of your interest - please let us know!


Hi! We have just added our plugin to Qiime2 library (see q2-health-index).
Currently, two actions are implemented: calculate-gmhi that computes health index using only abnundance table and calculate-gmhi-viz
which additionally creates the plot using alpha-group-significance from q2-diversity (you need to provide metadata in this case).

If anything is unclear or you get any problems, please create an issue on our Github page or share with us on the forum. Thank you!