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

**URL:** <https://forum.qiime2.org/t/q2-health-index-cannot-do-slice-indexing-on-class-pandas-core-indexes-base-index-with-these-indexers-0-0-of-class-numpy-float64/19828>\
**Category:** Library Support\
**Created:** [June 7, 2021, 10:40pm UTC](https://forum.qiime2.org/t/q2-health-index-cannot-do-slice-indexing-on-class-pandas-core-indexes-base-index-with-these-indexers-0-0-of-class-numpy-float64/19828 "2021-06-07T22:40:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rraf](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@rraf](https://forum.qiime2.org/u/rraf)\
**Post date:** [June 7, 2021, 10:40pm UTC](https://forum.qiime2.org/t/q2-health-index-cannot-do-slice-indexing-on-class-pandas-core-indexes-base-index-with-these-indexers-0-0-of-class-numpy-float64/19828/1 "2021-06-07T22:40:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [June 8, 2021, 6:39am UTC](https://forum.qiime2.org/t/q2-health-index-cannot-do-slice-indexing-on-class-pandas-core-indexes-base-index-with-these-indexers-0-0-of-class-numpy-float64/19828/2 "2021-06-08T06:39:55Z")

</div>

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](https://github.com/bioinf-mcb/q2-health-index) 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. 🤷‍♂️

Good luck!

---

<div class="post-metadata">

**Author:** ![rraf](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@rraf](https://forum.qiime2.org/u/rraf)\
**Post date:** [June 8, 2021, 1:38pm UTC](https://forum.qiime2.org/t/q2-health-index-cannot-do-slice-indexing-on-class-pandas-core-indexes-base-index-with-these-indexers-0-0-of-class-numpy-float64/19828/4 "2021-06-08T13:38:37Z")

</div>

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 ([A predictive index for health status using species-level gut microbiome profiling | Nature Communications](https://www.nature.com/articles/s41467-020-18476-8))??

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [June 10, 2021, 5:42am UTC](https://forum.qiime2.org/t/q2-health-index-cannot-do-slice-indexing-on-class-pandas-core-indexes-base-index-with-these-indexers-0-0-of-class-numpy-float64/19828/5 "2021-06-10T05:42:49Z")

</div>

> [@rraf](#):
>
> I would like to ask if you know another q2-plugin or alternative to calculate the GMHI index

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!

---

<div class="post-metadata">

**Author:** ![PawelSzczerbiak](https://forum.qiime2.org/user_avatar/forum.qiime2.org/pawelszczerbiak/32/11320_2.png) [@PawelSzczerbiak](https://forum.qiime2.org/u/PawelSzczerbiak)\
**Post date:** [June 22, 2021, 10:59am UTC](https://forum.qiime2.org/t/q2-health-index-cannot-do-slice-indexing-on-class-pandas-core-indexes-base-index-with-these-indexers-0-0-of-class-numpy-float64/19828/6 "2021-06-22T10:59:06Z")

</div>

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](https://www.nature.com/articles/s41467-020-18476-8)). 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!

---

<div class="post-metadata">

**Author:** ![PawelSzczerbiak](https://forum.qiime2.org/user_avatar/forum.qiime2.org/pawelszczerbiak/32/11320_2.png) [@PawelSzczerbiak](https://forum.qiime2.org/u/PawelSzczerbiak)\
**Post date:** [July 30, 2021, 3:37pm UTC](https://forum.qiime2.org/t/q2-health-index-cannot-do-slice-indexing-on-class-pandas-core-indexes-base-index-with-these-indexers-0-0-of-class-numpy-float64/19828/7 "2021-07-30T15:37:18Z")

</div>

Hi! We have just added our plugin to Qiime2 library (see [q2-health-index](https://library.qiime2.org/plugins/q2-health-index/37/)).  
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](https://github.com/bioinf-mcb/q2-health-index) or share with us on the forum. Thank you!
