Maaslin2 not recognizing reference group

Maaslin2 v 1.16.0

Hello, I have relative abundance data across 6 different groups and I am trying to set the reference as the “a_LF” group:

fit_data4 ← Maaslin2(input_data = input_data4,
input_metadata = input_metadata4,
fixed_effects = c(“Diet”),
reference = c(“a_LF”),
output = “output”)

and I am getting the following error:

Error in Maaslin2(input_data = input_data4, input_metadata = input_metadata4, : Please provide the reference for the variable ‘Diet’ which includes more than 2 levels: a_LF, b_LFHC, c_LFVHC, d_HF, e_HFHC, f_HFVHC

Here is some of my metadata:

Screenshot 2023-11-21 at 9.29.08 AM

I’ve tried renaming the different groups with and without the “a_” or as numbers but nothing seems to be working. Any ideas? Thank you!

Hi @herm98 - as mentioned in the manual, you need to specify the reference as follows:

The factor to use as a reference for a variable with more than two levels provided as a string of 'variable,reference' semi-colon delimited for multiple variables.

Thanks,
Himel