Error running longitudinal maturity-index


I am trying to run longitudinal maturity-index with QIIME2 2019.1 on a computing cluster. I am running the following command:

qiime longitudinal maturity-index --i-table filtered-table-strainTEST.qza --m-metadata-file mapQIIME.tsv --p-state-column AgeMonths --p-group-by Feeding4mo --p-control ‘EBF’ --p-individual-id-column SubjectID --p-missing-samples ignore --output-dir long_matindex_4moFeeding --verbose

I get the following error:

/panfs/roc/msisoft/qiime2/2019.1/lib/python3.6/site-packages/sklearn/ DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel()., y, **fit_params)
Traceback (most recent call last):
File “/panfs/roc/msisoft/qiime2/2019.1/lib/python3.6/site-packages/q2cli/”, line 274, in call
results = action(**arguments)
File “</panfs/roc/msisoft/qiime2/2019.1/lib/python3.6/site-packages/>”, line 2, in maturity_index
File “/panfs/roc/msisoft/qiime2/2019.1/lib/python3.6/site-packages/qiime2/sdk/”, line 231, in bound_callable
output_types, provenance)
File “/panfs/roc/msisoft/qiime2/2019.1/lib/python3.6/site-packages/qiime2/sdk/”, line 458, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File “/panfs/roc/msisoft/qiime2/2019.1/lib/python3.6/site-packages/q2_longitudinal/”, line 469, in maturity_index
pred_md, ‘prediction’, state_column, group_by, control)
File “/panfs/roc/msisoft/qiime2/2019.1/lib/python3.6/site-packages/q2_longitudinal/”, line 793, in _maz_score
_median, _std = medians[metadata.loc[i][column]]
KeyError: 0.5

Plugin error from longitudinal:


See above for debug info.

I have successfully run the feature-volatility analysis. Thanks for your help!

Hi @microB,
See the first note here. This error is occurring because you do not have enough samples where AgeMonths=0.5. You can use the --stratify parameter to ensure even stratification of ages between the training and test set, but in practice it would be better to bin your ages into larger groups. Minimum 5-10 samples per age group is a good rule of thumb, but feel free to experiment.

Good luck!