Hello! I’ve been running Maaslin3 and up until now it has been working great. However, I was recently given some extra metadata to work with and thus added some more covariates and have kept receiving errors. I have a microbial sample size of (n=379) with a metadata size of (n=386). I am running with 7 fixed effects and 1 random effect based on participant ID. One of those fixed effects is an ordered variable with 5 levels, while the rest of the fixed effects are all binomial. Prior to this I was running 4 fixed effects and 1 random effect. That analysis also had an ordered variable with 5 levels as one of the fixed effects.
Here are the following errors I am receiving now:
Error in add_joint_signif(fit_data_abundance, fit_data_prevalence, new_fit_data_abundance, :
Merged significance tables have different associations.
This is likely a MaAsLin 3 issue
due to unexpected data or models.
In addition: Warning message:
In formula.character(object, env = baseenv()) :
Using formula(x) is deprecated when x is a character vector of length > 1.
Consider formula(paste(x, collapse = " ")) instead.
Everything I’ve done has not fixed the issues I’m seeing. Thank you so much to who can help me with this, I really appreciate it!
Hi,
Would you mind posting the full maaslin3 command you’re running - I wasn’t quite sure based on your description whether you’re treating everything except participant ID as a fixed effect or whether you’re actually doing something with the ordered variables.
Will
Yes of course, thank you!
Here’s what it looks like:
fit_out_new ← maaslin3(
input_data = nit_sum,
input_metadata = NewBFmd_1,
output = ‘detail_bf_a4’,
formula = ‘~ campy_pres_abs + ordered(sampling_cluster5) + diar_cur + late_untimely + prelac + earlybf + colostrum + (1|Participant_ID)’,
small_random_effects = TRUE,
plot_summary_plot = FALSE,
plot_associations = FALSE)
Ah, I see. For the sampling_cluster5 variable that you’re using as ordered, do you actually care about the level-to-level differences in it, or are you just using it as ordered to control for it? If it’s the former, you’re fitting a pretty computationally complex model, and we’ll probably need to figure out if there’s a way to simplify it. If it’s the latter, you can just leave out the ordered (i.e. just include it as categorical) and the results will be the same for all the other variables. This will likely avoid the model fitting issues.
Will
Hello!
In my original model I did not have it ordered, but my research team slightly altered their interest in the data and they did care about the level to level differences. I reran this model with the non ordered portion and it still came up with the same error message.
I’m wondering if it’s due to most of my fixed effects? In my first model I had less fixed effects and it worked. All of the fixed effects I added only have “0” or “1” in the metadata column (and there are some “NAs”).
Thank you for your time and help with this issue so far I appreciate it!
Oh, the NA values might be the issue - currently the samples with any NA metadata are dropped from the analysis. How many samples does that affect?
Oh my goodness it affects so many. I feel so silly now that definitely underpowers my data after seeing how many samples are being removed. I really appreciate your time and help with this I think I have it figured out now. Thank you so much!
Best,
Hello! I have a question and update.
After using the mice package in R I was able to impute for the missing values. Once I ran Maaslin3 again I was met with the same error message as before (even when I tried it again without the ordered(sampling_cluster5) variable.
“Error in add_joint_signif(fit_data_abundance, fit_data_prevalence, new_fit_data_abundance, :
Merged significance tables have different associations.
This is likely a MaAsLin 3 issue
due to unexpected data or models.”
It seems like it might not have been the NAs. I ran this with Maaslin2 which which ended up working, which is good news! Is there any idea on why Maaslin3 might not be compatible? Thank you.
Best,
Would you mind finding a subset of your data for which you still get the error and emailing it to me at willnickols@g.harvard.edu? I think it’s going to be pretty difficult to debug what’s going on without running the models step by step.
So others can see, I have sent the data set. Thank you so much for your time and help with this!