I would like to perform qiime gneiss gradient-clustering on a categorical variable with two levels (F and C). however when I run this, I get the following error:
There was an issue with retrieving column 'Size' from the metadata:
Metadata column 'Size' is categorical. Option --m-gradient-column expects the column to be numeric.
Judging from this post it seems, that the option --m-gradient-column would work on a categorical variable only. However, when I dig into the Usage Options it seems this works on a numeric column only.
Is it (still?) possible to perform gradient clustering on categorical variables?
I could convert my gradient column into numeric values, e.g. F=1, C=2, however I was wondering if there is a better way to do this.
Thanks for the cross-references, that was super helpful!
On close inspection, I think that post is only implying that categorical values should be used in the dendrogram-heatmap method:
It sounds like the numerical values in the gradient-clustering command weren't really part of the question in that original thread ("Appears to work for the gradient-clustering command" sounds to me like their numeric pH column worked without modification). I had to read the post a few times to get it straight in my head, so please double-check me, I might've missed something!
See my interpretation above, I don't think this was ever possible, with respect to gradient-clustering.
This will probably be your best bet moving forward, although you don't need to remove your existing column, you could just define a new column and point gneiss gradient-clustering to that new column!
It was a bit confusing, that dendrogram-heatmap would use categorical values and gradient-clustering numeric values of the same variable - ph in this example of 88soils.