Adonis - Plugin error from diversity: is not a column in the metadata

Hi everyone,

I'm having problems to run adonis. I have 4 categorical variables "local", "period", "origin","collection-moment".

I sucessfully runned adonis with all variables but when I tried to run with the "collection-moment" it gives me this error message: Plugin error from diversity:

'collection' is not a column in the metadata. Available columns: 'local', 'period', 'origin', 'collection-moment'

Debug info has been saved to /tmp/qiime2-q2cli-err-u0blxx5u.log

I've checked the forum and found here the answer for my problem. So I tried to follow the indications from @thermokarst to modify my metadata, but in my metadata I have the header row sample-id instead of #SampleID. Also I tried with just id but doesn't work.

I have successfully used my metadata for my other analyzes in my pipeline and previously checked for possible errors using keemei. Metadados.txt (3.0 KB)

How can I solve this bug?

Thanks in advance


I tried to run ANOVA with the variable "collection-moment" in the p-formula, and I found the same error.

Hi @joaomiranda,

This is just a hunch.
The error is complaining that it can't find the collection column even though your input is collection-moment I think what is happening is that under the hood, R is treating the hyphen in your column name as a minus operator so it thinks you want to substract moment from collection in the formula which doesn't really make sense.

Try changing that column name to something without a hyphen, like collection_moment and see if that works. You can probably also resolve this by adding quotes around collection-moment within your formula but the first option is probably safer .


Hi @Mehrbod_Estaki ,

Thank you so much! I changed for collection_moment and solve my problems!

1 Like

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