Setting up Maaslin2 for complex comparisons

Hi all,

I’m working on a complicated study (FMT in humans and mice), and I’d like to use Maaslin2 to look for functional changes after the FMT. The FMT was completed in three rounds over the course of time, and I’d like to draw the following comparisons:


As you can see from the graph, I have several donor samples in the Donors group, one sample per mouse in the Baseline group, and three samples from the same mouse taken at various times in the following three Response groups.

Here is my code:

fit_data = Maaslin2(
input_data = df_input_data,
input_metadata = df_input_metadata,
min_abundance = 0.001,
min_prevalence = 0.1,
max_significance = 0.05,
normalization = “NONE”,
transform = “LOG”,
analysis_method = “LM”,
output = “Maaslin2”,
fixed_effects = c(“Response”),
reference = “Response,Donor”,
random_effects = c(“SubjectID”))

My first question is since I am using SubjectID as a random effect, is it legit to have more than one sample from the same subject in the Group. Like for example in Donor group or time course samples in Response group.

And second question is to make all possible comparisons is it enough if I just change the preference value and combine all the results at the end?

Thanks in advance for your response!
Best,
Maki

Sorry, your experimental structure looks to be a lot more complicated than the simple random effects framework in Maaslin can handle. You might want to use Maaslin for the normalization/filtering/transformation, but I suggest you consult with a statistician for the modeling. Maaslin2 can basically only add random intercept terms e.g. (1|group). In your case you need to account for the partial nesting of SubjectID within response, as well as the appropriate donor:recipient pairing. Also if the longitudinal aspect matters then that should be incorporated as well.

@andrewGhazi - Thanks a lot for your valuable answer. I’ll also consult a statistician.