Hi there,
I have tried to run a differential abundance analysis using maaslin3 on my 16s rRNA data. I want to test differential abundance between two time points for the same 12 subjects.
I have tried both the Bioconductor version (1.0.2) and the latest GitHub version (0.99.18), but the model returns no results for features (empty columns for coef, p.vals, q.vals, etc in all_results.tsv), with errors like “No data points have the baseline factor level” and “All logistic values are the same“ even though my data appear correct.
This is the model setup:
set.seed(1)
fit_out <- maaslin3(input_data = normalized_otu,
input_metadata = metadata,
output = "output/maaslin_week3_6_absolute",
formula = '~ Week_aligned + reads + (1|ID)',
normalization = 'NONE',
transform = 'LOG',
augment = TRUE,
standardize = TRUE,
max_significance = 0.1,
median_comparison_abundance = FALSE,
median_comparison_prevalence = FALSE,
max_pngs = 250)
The input data
I am using absolute abundance in the normalized_otu matrix. The structure of the input data is as below.
> str(metadata)
'data.frame': 24 obs. of 4 variables:
$ ID : Factor w/ 14 levels "7302","7304",..: 12 6 13 11 12 1 9 14 9 8 ...
$ Week : Ord.factor w/ 6 levels "1"<"2"<"3"<"4"<..: 6 6 6 6 3 6 3 6 6 6 ...
$ Week_aligned: Factor w/ 2 levels "3","6": 1 2 1 2 2 1 2 2 1 2 ...
$ reads : num 6503 46380 34994 34505 47088 ...
> str(normalized_otu)
num [1:24, 1:8] 2.33e+10 2.66e+10 1.67e+10 3.23e+10 2.10e+10 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:24] "7317_6" "7309_6" "7318_6" "7316_6" ...
..$ : chr [1:8] "Firmicutes" "Actinobacteria" "Bacteroidetes" "Proteobacteria" ...
Some of the troubleshooting attempted
- Checked that rownames of OTU table and metadata match and are in the same order.
- Confirmed
Week_alignedis a factor with levels c(“3”, “6”), both groups have 12 samples. - Added a pseudo-count to OTU table before log transform.
- Tried formula with only
Week_aligned, with and without normalization/transform. - When I try more minimal models or default settings, I experience the same issue.
- Updated all dependencies and packages.
- Installed both Bioconductor and GitHub versions of Maaslin3.
Session info
R version 4.5.1 (2025-06-13 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows Server 2022 x64 (build 20348)
Matrix products: default
LAPACK version 3.12.1
locale:
[1] LC_COLLATE=Danish_Denmark.utf8 LC_CTYPE=Danish_Denmark.utf8 LC_MONETARY=Danish_Denmark.utf8 LC_NUMERIC=C LC_TIME=Danish_Denmark.utf8
time zone: Europe/Berlin
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] phyloseq_1.52.0 kableExtra_1.4.0 ggpubr_0.6.2 GMHmicrobiome_0.1.0 lubridate_1.9.4 forcats_1.0.1 stringr_1.5.2 dplyr_1.1.4 purrr_1.1.0 readr_2.1.5 tidyr_1.3.1
[12] tibble_3.3.0 ggplot2_4.0.0 tidyverse_2.0.0 maaslin3_0.99.18
loaded via a namespace (and not attached):
[1] Rdpack_2.6.4 pbapply_1.7-4 permute_0.9-8 rlang_1.1.6 magrittr_2.0.4 ade4_1.7-23 matrixStats_1.5.0
[8] compiler_4.5.1 mgcv_1.9-3 systemfonts_1.3.1 vctrs_0.6.5 reshape2_1.4.4 pkgconfig_2.0.3 crayon_1.5.3
[15] fastmap_1.2.0 backports_1.5.0 XVector_0.48.0 rmarkdown_2.30 tzdb_0.5.0 nloptr_2.2.1 UCSC.utils_1.4.0
[22] xfun_0.53 GenomeInfoDb_1.44.3 jsonlite_2.0.0 biomformat_1.36.0 rhdf5filters_1.20.0 DelayedArray_0.34.1 Rhdf5lib_1.30.0
[29] BiocParallel_1.42.2 cluster_2.1.8.1 broom_1.0.10 parallel_4.5.1 R6_2.6.1 stringi_1.8.7 RColorBrewer_1.1-3
[36] boot_1.3-32 pkgload_1.4.1 car_3.1-3 GenomicRanges_1.60.0 Rcpp_1.1.0 SummarizedExperiment_1.38.1 iterators_1.0.14
[43] knitr_1.50 IRanges_2.42.0 igraph_2.2.1 Matrix_1.7-4 splines_4.5.1 timechange_0.3.0 tidyselect_1.2.1
[50] rstudioapi_0.17.1 dichromat_2.0-0.1 abind_1.4-8 yaml_2.3.10 vegan_2.7-2 TreeSummarizedExperiment_2.16.1 codetools_0.2-20
[57] lattice_0.22-7 plyr_1.8.9 Biobase_2.68.0 treeio_1.32.0 withr_3.0.2 S7_0.2.0 evaluate_1.0.5
[64] survival_3.8-3 getopt_1.20.4 xml2_1.4.1 Biostrings_2.76.0 pillar_1.11.1 MatrixGenerics_1.20.0 carData_3.0-5
[71] foreach_1.5.2 stats4_4.5.1 reformulas_0.4.1 generics_0.1.4 S4Vectors_0.46.0 hms_1.1.4 scales_1.4.0
[78] tidytree_0.4.6 minqa_1.2.8 glue_1.8.0 lazyeval_0.2.2 tools_4.5.1 data.table_1.17.8 lme4_1.1-37
[85] ggsignif_0.6.4 fs_1.6.6 rhdf5_2.52.1 grid_4.5.1 optparse_1.7.5 ape_5.8-1 rbibutils_2.3
[92] colorspace_2.1-2 SingleCellExperiment_1.30.1 nlme_3.1-168 GenomeInfoDbData_1.2.14 Formula_1.2-5 cli_3.6.5 rappdirs_0.3.3
[99] textshaping_1.0.4 S4Arrays_1.8.1 viridisLite_0.4.2 svglite_2.2.2 gtable_0.3.6 logging_0.10-108 rstatix_0.7.3
[106] yulab.utils_0.2.1 digest_0.6.37 BiocGenerics_0.54.1 SparseArray_1.8.1 farver_2.1.2 multtest_2.64.0 htmltools_0.5.8.1
[113] lifecycle_1.0.4 httr_1.4.7 MASS_7.3-65
I have not tried to post an issue before, so if you need more info, please let me know.
Thank you!
maaslin3_log.txt (13.9 KB)