Hello,
I am trying to use masaslin3 for the first time and when I run the example code from masaslin3 function, I have very strange things in the presence/absence results. I get the same error for all taxa: “non-integer number of successes in a binomial glm!” (I am not sure of the exact message since my output is in French). Thus, no qval_individual is computed and the presence/absence results are not being used. I have the same issue when running masaslin3 on other datasets with a simple grouping factor. Would you have an idea of where it could come from (maybe a specific package to update)? Below an example of the problematic output and my R session information.
Thank you for your help!
Aurélie
Hi Aurélie,
This is a funny problem! During the data augmentation step to improve logistic regression, the model uses small, non-integer weights for the augmented points. For historical reasons, the weights are assumed to be integers, but they work just fine even if they’re not integers. However, a warning is thrown, so we catch it (the English version) and get rid of it. However, because the error thrown is in French, the automatic catching doesn’t work. Two possible solutions:
- If it’s not that hard to switch R to English (or install the English version of MaAsLin 3 and lme4 if that’s a possibility), that should fix the issue.
- If that doesn’t work, you could just ignore those errors and manually calculate the q-values based on applying
p.adjust
to the p-values.
Will
Hi Will,
Indeed, this is a funny problem. Using Sys.setenv(LANGUAGE=‘en’) before running my code works. Thank you!
Aurélie
Hello, I’m trying to use MAASLIN3 to analyze the relative abundance data table of my 16S rRNA sequences. However, I encountered an error when performing the association analysis between prevalence and abundance for some bacterial genera, and the fitting process failed. Below is my code and the all_result obtained after the analysis. Could you please advise on how to resolve this issue?
fit_out ← maaslin3(input_data = clear_GEE,
input_metadata = metadata,
output = ‘maaslin3_clearGEE_BOP’,
formula = ‘~ BOP+(1|ID)’,
small_random_effects = TRUE,
normalization = ‘TSS’,
transform = ‘LOG’,
augment = TRUE,
standardize = TRUE,
median_comparison_abundance = TRUE,
median_comparison_prevalence = FALSE,
correction = ‘BH’,
max_significance = 0.05,
max_pngs = 800,
cores = 1,
save_models = TRUE,
plot_summary_plot = TRUE,
plot_associations = TRUE,
summary_plot_first_n = 142,
coef_plot_vars = c(‘BOP’),
heatmap_vars = c(‘BOP’))
)
Hi,
The abundance errors (number of levels of each grouping factor...
) are likely because you only have one sample per group (ID). Make sure you in fact have multiple samples per ID if you’re using it as a random effect and that ID is a factor and not numeric.
The prevalence error (All logistic values are the same
) is just a result of your data. If the feature is always present or always absent (therefore always 0 or always 1), it’s not possible for there to be an association.
Will