Error when using qiime gneiss gradient-clustering

When using the following command, I got the error below that means a column in my metadata file is numeric. I removed the year column and still have the same problem. My samples' codes start with numbers, e.g., 16TB, is that the problem?
Is there any solution without changing the samples' codes.
By the way, I ran the same command last year, but in different qiime environment (the available at that time without having any issue). I am not sure what is wrong in my files.

qiime gneiss gradient-clustering \

--i-table table-no-mito-no-chlor.qza
--m-gradient-file metadata.tsv
--m-gradient-column PathogenTreatment
--o-clustering gradient-hierarchy.qza

Usage: qiime gneiss gradient-clustering [OPTIONS]

Build a bifurcating tree that represents a hierarchical clustering of
features. The hiearchical clustering uses Ward hierarchical clustering
based on the mean difference of gradients that each feature is observed
in. This method is primarily used to sort the table to reveal the
underlying block-like structures.

--i-table ARTIFACT FeatureTable[Frequency | RelativeFrequency |
Composition] The feature table containing the samples in which the
columns will be clustered. [required]
--m-gradient-file METADATA
--m-gradient-column COLUMN MetadataColumn[Numeric]
Contains gradient values to sort the features and
samples. [required]
--p-ignore-missing-samples / --p-no-ignore-missing-samples
[default: False]
--p-weighted / --p-no-weighted
Specifies if abundance or presence/absence information
should be used to perform the clustering.
[default: True]
--o-clustering ARTIFACT
Hierarchy A hierarchy of feature identifiers where each tip
corresponds to the feature identifiers in the table.
This tree can contain tip ids that are not present in
the table, but all feature ids in the table must be
present in this tree. [required]
--output-dir PATH Output unspecified results to a directory
--verbose / --quiet Display verbose output to stdout and/or stderr during
execution of this action. Or silence output if
execution is successful (silence is golden).
--citations Show citations and exit.
--help Show this message and exit.

                There was a problem with the command:                     

(1/1) Invalid value for "--m-gradient-file": Metadata column is of type
'categorical', but expected Numeric.

Hi @Eman,
The error actually indicates that –m-gradient-column PathogenTreatment should be numeric while yours is categorical. Also, I would point out that q2-gneiss is being deprecated (I believe) in favor of q2-songbird, so you may be better off using that instead anyways.

Oh! thank you. But I believe estimations are done on feature table which is numeric (based on metadata categories), right? My major metadata is pathogen treatment (healthy and infected), I mean it is not numeric column??

Hi @Eman,
Have a look (or a re-look if needed) through the q2-gneiss tutorial here for some more details, but the gradient clustering you are trying to do specifically requires a numeric column in your metadata. For your case, with the categorical column, you’ll just want to stick with the default option of using correlation-clustering, build the balances, and use your categorical column as input when building the linear regression model.

I should also clarify that q2-gneiss is not being deprecated at the moment, though several of its visualizers have been and will be removed in the next release of Qiime2. The developer of q2-gneiss and q2-songbird recommends using the latter.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.