# Current Bioconductor version of Maaslin2 gives fatal error with random effects

**URL:** <https://forum.biobakery.org/t/current-bioconductor-version-of-maaslin2-gives-fatal-error-with-random-effects/6861>\
**Category:** MaAsLin\
**Created:** [March 28, 2024, 4:44pm UTC](https://forum.biobakery.org/t/current-bioconductor-version-of-maaslin2-gives-fatal-error-with-random-effects/6861 "2024-03-28T16:44:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickp60](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/nickp60/32/1031_2.png) [@nickp60](https://forum.biobakery.org/u/nickp60)\
**Post date:** [March 28, 2024, 4:44pm UTC](https://forum.biobakery.org/t/current-bioconductor-version-of-maaslin2-gives-fatal-error-with-random-effects/6861/1 "2024-03-28T16:44:34Z")

</div>

It looks like the version from Bioconductor is quite out of date; this results in fatal errors when attempting to run models with random effects.

Additionally, the example commands in the README need to be updated to include the parameter setting the reference level for `diagnosis`.

---

<div class="post-metadata">

**Author:** ![Kelsey\_Thompson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kelsey_thompson/32/65_2.png) [@Kelsey\_Thompson](https://forum.biobakery.org/u/Kelsey_Thompson)\
**Post date:** [March 29, 2024, 5:32pm UTC](https://forum.biobakery.org/t/current-bioconductor-version-of-maaslin2-gives-fatal-error-with-random-effects/6861/3 "2024-03-29T17:32:41Z")

</div>

Hi Nick -

Can you tell us more about how you are running MaAsLin? I tested for a fatal error on the BioC version of MaAsLin (v1.16.0) in R (v4.3.3) and it ran fine for me on the tutorial code with the random effect.

Thanks for catching that we are behind on the README! We will make sure to update that.

Best,  
Kelsey

---

<div class="post-metadata">

**Author:** ![nickp60](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/nickp60/32/1031_2.png) [@nickp60](https://forum.biobakery.org/u/nickp60)\
**Post date:** [March 29, 2024, 8:22pm UTC](https://forum.biobakery.org/t/current-bioconductor-version-of-maaslin2-gives-fatal-error-with-random-effects/6861/4 "2024-03-29T20:22:32Z")

</div>

Hi Kelsey,  
Thanks so much for looking into this! Apologies, it appears to be a red herring. I don’t know the exact issue, but it appears to be related to having phyloseq loaded at the same time. running `unloadNamespace("phyloseq")` resolved the issue.

Here is the sessionInfo where Maaslin2 fatal errors:

```auto
sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base     

other attached packages:
[1] phyloseq_1.42.0 Maaslin2_1.15.1

loaded via a namespace (and not attached):
 [1] Biobase_2.58.0 jsonlite_1.8.7 splines_4.2.1 foreach_1.5.2 stats4_4.2.1 GenomeInfoDbData_1.2.9 yaml_2.3.7 robustbase_0.99-0 pillar_1.9.0 lattice_0.20-45       
[11] glue_1.6.2 digest_0.6.33 XVector_0.38.0 colorspace_2.1-0 htmltools_0.5.7 Matrix_1.6-2 plyr_1.8.9 pcaPP_2.0-3 pkgconfig_2.0.3 biglm_0.9-2.1         
[21] bookdown_0.36 zlibbioc_1.44.0 mvtnorm_1.2-3 scales_1.2.1 getopt_1.20.4 optparse_1.7.3 tibble_3.2.1 mgcv_1.8-40 generics_0.1.3 IRanges_2.32.0        
[31] ggplot2_3.4.4 BiocGenerics_0.44.0 cli_3.6.1 survival_3.3-1 magrittr_2.0.3 crayon_1.5.2 evaluate_0.23 fansi_1.0.5 nlme_3.1-157 MASS_7.3-57           
[41] vegan_2.6-4 tools_4.2.1 data.table_1.14.8 lifecycle_1.0.4 stringr_1.5.0 Rhdf5lib_1.20.0 S4Vectors_0.36.2 munsell_0.5.0 cluster_2.1.3 Biostrings_2.66.0     
[51] ade4_1.7-22 compiler_4.2.1 GenomeInfoDb_1.34.9 rlang_1.1.2 rhdf5_2.42.1 grid_4.2.1 RCurl_1.98-1.12 iterators_1.0.14 rhdf5filters_1.10.1 biomformat_1.26.0     
[61] rstudioapi_0.15.0 igraph_1.5.1 bitops_1.0-7 rmarkdown_2.25 gtable_0.3.4 codetools_0.2-18 multtest_2.54.0 DBI_1.1.3 reshape2_1.4.4 R6_2.5.1              
[71] knitr_1.45 dplyr_1.1.3 fastmap_1.1.1 utf8_1.2.4 permute_0.9-7 ape_5.7-1 stringi_1.7.12 parallel_4.2.1 Rcpp_1.0.11 vctrs_0.6.4           
[81] DEoptimR_1.1-3 tidyselect_1.2.0 xfun_0.41             

```

Here is the sessionInfo where Maaslin2 works fine after running `unloadNamespace("phyloseq")`:

```auto
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base     

other attached packages:
[1] Maaslin2_1.15.1

loaded via a namespace (and not attached):
 [1] Biobase_2.58.0 jsonlite_1.8.7 splines_4.2.1 foreach_1.5.2 stats4_4.2.1 GenomeInfoDbData_1.2.9 yaml_2.3.7 robustbase_0.99-0 pillar_1.9.0 lattice_0.20-45       
[11] glue_1.6.2 digest_0.6.33 XVector_0.38.0 colorspace_2.1-0 htmltools_0.5.7 Matrix_1.6-2 plyr_1.8.9 pcaPP_2.0-3 pkgconfig_2.0.3 biglm_0.9-2.1         
[21] bookdown_0.36 zlibbioc_1.44.0 mvtnorm_1.2-3 scales_1.2.1 getopt_1.20.4 optparse_1.7.3 tibble_3.2.1 mgcv_1.8-40 generics_0.1.3 IRanges_2.32.0        
[31] ggplot2_3.4.4 BiocGenerics_0.44.0 cli_3.6.1 survival_3.3-1 magrittr_2.0.3 crayon_1.5.2 evaluate_0.23 fansi_1.0.5 nlme_3.1-157 MASS_7.3-57           
[41] vegan_2.6-4 tools_4.2.1 data.table_1.14.8 lifecycle_1.0.4 stringr_1.5.0 Rhdf5lib_1.20.0 S4Vectors_0.36.2 munsell_0.5.0 cluster_2.1.3 Biostrings_2.66.0     
[51] ade4_1.7-22 compiler_4.2.1 GenomeInfoDb_1.34.9 rlang_1.1.2 rhdf5_2.42.1 grid_4.2.1 RCurl_1.98-1.12 iterators_1.0.14 rhdf5filters_1.10.1 biomformat_1.26.0     
[61] rstudioapi_0.15.0 igraph_1.5.1 bitops_1.0-7 rmarkdown_2.25 gtable_0.3.4 codetools_0.2-18 multtest_2.54.0 DBI_1.1.3 reshape2_1.4.4 R6_2.5.1              
[71] knitr_1.45 dplyr_1.1.3 fastmap_1.1.1 utf8_1.2.4 permute_0.9-7 ape_5.7-1 stringi_1.7.12 parallel_4.2.1 Rcpp_1.0.11 vctrs_0.6.4           
[81] DEoptimR_1.1-3 tidyselect_1.2.0 xfun_0.41    

```

I need to work out a better test environment, apologies for the confusion!

Thanks,

Nick
