PERMANOVA metadata restrictions

Hello everyone,

I would like to run a PERMANOVA on the weighted unifrac distance matrix from the core metrics results from my data set. I want to see if any of the variables measured (metadata or map columns) significantly influence the difference in communities between samples.

However, some of my metadata is numerical, not categorical. When I tried to run these commands, it did not work.

The command I ran was as follows:

qiime diversity beta-group-significance
--i-distance-matrix DOC_rarefied-core-metrics-results/bray_curtis_distance_matrix.qza
--m-metadata-file DOC_map_contaminants_removed.tsv
--m-metadata-column DOC_concentration
--o-visualization DOC_rarefied-core-metrics-results/ DOC_concentration-significance.qzv

The terminal response looked like this:
(1/2) Invalid value for '--m-metadata-file': Metadata column is of type
'numeric', but expected Categorical.
(2/2) Missing option '--o-visualization'. ("--output-dir" may also be used)

Is there anyway to run a PERMANOVA (or analogous method) on my data to see if any of the metadata significantly influence the difference in communities between samples? Another QIIME2 user recommended running an environmental fit vector. Might that work okay?

See attached file for my data.
DOC_map_contaminants_removed.tsv (2.0 KB)

Thanks so much for your help,


Hi @auroramokris,

Welcome to the :qiime2: forum!

I think this is a brilliant idea to test all your variables! There are 3 options for working with continious data, YMMV:

  1. Descretize it into categories. My epidemiology colleagues are big fans of this approach, and it can make sense if you have something that's easily split, you plan to run other tests that like descritized data (cox regression, logistic regression) later in your analysis, or you want to use univariate differential abundance technqiues that prefer categorical data.
  2. Use the adonis function (qiime diversity adonis) which is a multivariate permanova and equipped to handle continuous covariates. Adonis cannot do post-hoc testing, so just keep that in mind.
  3. Convert your continous variables into a distance matrix (I think there's a function in q2-metadata) and then run a mantel test in q2-diversity. This is TBH probably my least favorite option.

You may also want to think about how you'll model your multivariate data after significance testing.

Good luck and let us know if you have any questions!


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