MaAsLin2 Version ‘1.16.0’
I am analyzing a data set from a longitudinal study including 8 timepoints collected from 9 different individuals. When I run the model specifying only the fixed effect of “Time.Point” the results are as expected. However, when I run the model including the random effects of “SubjectID” the output contains duplicate rows for every feature; in each duplicate row the metadata and value are populated by the names of the variables “Time.Point” and "SubjectID, respectively. The coeff, stderr, pval, and qval are all “NA.” When I use the random effect as the fixed effect, it works as expected.
Code:
#this works
maaslin_res ← Maaslin2(
input_data = PRE,
input_metadata = sam_16S_PRE,
normalization = “CLR”,
transform = “None”,
output = “maaslin_PRE_output”,
fixed_effects = “SubjectID”,
)
#this works
maaslin_res ← Maaslin2(
input_data = PRE,
input_metadata = sam_16S_PRE,
normalization = “CLR”,
transform = “None”,
output = “maaslin_PRE_output”,
fixed_effects = c(“Time.Point”),
)
#does not work
maaslin_res ← Maaslin2(
input_data = PRE,
input_metadata = sam_16S_PRE,
normalization = “CLR”,
transform = “None”,
output = “maaslin_PRE_output”,
fixed_effects = c(“Time.Point”),
random_effects = c(“SubjectID”)
)
I tried the example from the tutorial and the same problem occurs using the random effects
#this works
fit_data ← Maaslin2(
input_data, input_metadata,‘demo_output’, transform = “AST”,
fixed_effects = c(‘diagnosis’, ‘dysbiosisnonIBD’,‘dysbiosisUC’,‘dysbiosisCD’, ‘antibiotics’, ‘age’),
normalization = ‘NONE’,
reference = ‘diagnosis,nonIBD’,
standardize = FALSE)
#does not work
fit_data ← Maaslin2(
input_data, input_metadata,‘demo_output’, transform = “AST”,
fixed_effects = c(‘diagnosis’, ‘dysbiosisnonIBD’,‘dysbiosisUC’,‘dysbiosisCD’, ‘antibiotics’, ‘age’),
random_effects = c(‘site’, ‘subject’),
normalization = ‘NONE’,
reference = ‘diagnosis,nonIBD’,
standardize = FALSE)
I have tried restarting R studio and reinstalling Maaslin2. Neither have resolved the issue. What is especially strange as I have been working with these data for weeks and the models with random effects have worked as expected. I do not think the problem is with my data because the example also does not run when random effects are included.
P.S. I know including example data and reproducible code would be useful, but I am relatively new to the forum and unsure how to do so. I am willing to include it if someone can point out how to include it in the post.
Thank you!