1 Introduction

1.1 Motivation

iSEEtree is a Bioconductor package for the interactive visualisation of microbiome data stored in a TreeSummarizedExperiment (TreeSE) container. On the one side, it leverages and extends the graphics of the iSEE package, which is designed for the generic SummarizedExperiment class. On the other side, it employs the statistical and visual tools for microbiome data science provided by the mia family of packages. Thus, iSEE and mia represent the two building blocks of iSEEtree. Detailed introductory material on these two frameworks is available in the iSEE-verse website and the OMA Bioconductor book, respectively.

iSEEtree is meant for new and experienced users alike, who desire to create and interact with several graphics for microbiome data, without the need for an in-depth knowledge of the underlying mia functionality. Current microbiome-specific panels include phylogenetic trees, ordination plots and compositional plots, which can be further explored below in this article. Other more generic panels are also reused from the iSEE package and can be experimented in this article.

1.2 Panels

iSEEtree derives its microbiome-related visualisation methods from the miaViz package, which is code-based and requires basic knowledge of R programming and microbiome data structures. The following panels represent an easy-to-use interactive version of the miaViz plotting functions:

  • AbundanceDensityPlot: a density plot of the top features, where every line is a feature and the x axis shows its abundance for different samples. Its interpretation is explained in the OMA chapter on Exploration.
  • AbundancePlot: a compositional barplot of the samples, where every bar is a sample composed by different features in different colours. Its interpretation is explained in the OMA chapter on Community Composition.
  • ColumnTreePlot: the hierarchical organisation of the samples, where every tip is a sample and the closer the more related they are.
  • LoadingPlot: a heatmap or barplot of the loadings or contributions of each feature to the reduced dimensions of PCA, PCoA or another ordination method.
  • RDAPlot: an supervised ordination plot of the samples, where every dot is a sample on a reduced dimensional space and every arrow reflects the contribution of a sample variable. Its interpretation is explained in the OMA chapter on Community Similarity.
  • RowTreePlot: a phylogenetic tree of the features, where every tip is a feature and two neighbouring tips are more closely related than two far apart from each other.

By default, the iSEEtree layout also includes the following panels inherited by iSEE:

The ColumnDataPlot could also prove useful for the visualisation of column variables such as alpha diversity indices. Its interpretation is explained in the OMA chapter on Community Diversity.

2 Tutorial

2.1 Installation

R is an open-source statistical environment which can be easily modified to enhance its functionality via packages. iSEEtree is an R package available on Bioconductor. R can be installed on any operating system from CRAN after which you can install iSEEtree by using the following commands in your R session:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("iSEEtree")

2.2 Example

The panels described above can be generated for a model TreeSE object in the following example:

library(iSEEtree)
library(mia)
library(scater)

# Import TreeSE
data("Tengeler2020", package = "mia")
tse <- Tengeler2020

# Add relabundance assay
tse <- transformAssay(tse, method = "relabundance")

# Add reduced dimensions
tse <- runMDS(tse, assay.type = "relabundance")

# Launch iSEE
if (interactive()) {
  iSEE(tse)
}

3 Resources

3.1 Citation

We hope that iSEEtree will be useful for your research. Please use the following information to cite the package and the overall approach. Thank you!

## Citation info
citation("iSEEtree")
#> To cite package 'iSEEtree' in publications use:
#> 
#>   Benedetti G, Lahti L (2024). _iSEEtree: Interactive visualisation for
#>   microbiome data_. doi:10.18129/B9.bioc.iSEEtree
#>   <https://doi.org/10.18129/B9.bioc.iSEEtree>, R package version 1.1.2,
#>   <https://bioconductor.org/packages/iSEEtree>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {iSEEtree: Interactive visualisation for microbiome data},
#>     author = {Giulio Benedetti and Leo Lahti},
#>     year = {2024},
#>     note = {R package version 1.1.2},
#>     url = {https://bioconductor.org/packages/iSEEtree},
#>     doi = {10.18129/B9.bioc.iSEEtree},
#>   }

3.2 Background Knowledge

iSEEtree is based on many other packages and in particular on those that have implemented the infrastructure needed for dealing with omics data, microbiome data and interactive visualisation. That is, packages like SummarizedExperiment, TreeSummarizedExperiment, mia, iSEE and shiny.

If you are asking yourself the question “Where do I start using Bioconductor?” you might be interested in this blog post.

3.3 Help

As package developers, we try to explain clearly how to use our packages and in which order to use the functions. But R and Bioconductor have a steep learning curve so it is critical to learn where to ask for help. The blog post quoted above mentions some but we would like to highlight the Bioconductor support site as the main resource for getting help: remember to use the iSEEtree tag and check the older posts. Other alternatives are available such as creating GitHub issues and tweeting. However, please note that if you want to receive help you should adhere to the posting guidelines. It is particularly critical that you provide a small reproducible example and your session information so package developers can track down the source of the error.

4 Reproducibility

iSEEtree was made possible thanks to:

  • R (R Core Team, 2024)
  • BiocStyle (Oleś, 2024)
  • knitr (Xie, 2024)
  • RefManageR (McLean, 2017)
  • rmarkdown (Allaire, Xie, Dervieux, McPherson, Luraschi, Ushey, Atkins, Wickham, Cheng, Chang, and Iannone, 2024)
  • testthat (Wickham, 2011)

This package was developed using usethis.

R session information:

#> R Under development (unstable) (2024-10-21 r87258)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.1 LTS
#> 
#> Matrix products: default
#> BLAS:   /home/biocbuild/bbs-3.21-bioc/R/lib/libRblas.so 
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB              LC_COLLATE=C              
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: America/New_York
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats4    stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#>  [1] scater_1.35.0                   ggplot2_3.5.1                   scuttle_1.17.0                 
#>  [4] mia_1.15.6                      TreeSummarizedExperiment_2.15.0 Biostrings_2.75.3              
#>  [7] XVector_0.47.0                  MultiAssayExperiment_1.33.1     iSEEtree_1.1.2                 
#> [10] iSEE_2.19.2                     SingleCellExperiment_1.29.1     SummarizedExperiment_1.37.0    
#> [13] Biobase_2.67.0                  GenomicRanges_1.59.1            GenomeInfoDb_1.43.2            
#> [16] IRanges_2.41.2                  S4Vectors_0.45.2                BiocGenerics_0.53.3            
#> [19] generics_0.1.3                  MatrixGenerics_1.19.0           matrixStats_1.4.1              
#> [22] RefManageR_1.4.0                BiocStyle_2.35.0               
#> 
#> loaded via a namespace (and not attached):
#>   [1] splines_4.5.0               later_1.4.1                 ggplotify_0.1.2             tibble_3.2.1               
#>   [5] polyclip_1.10-7             rpart_4.1.23                DirichletMultinomial_1.49.0 lifecycle_1.0.4            
#>   [9] doParallel_1.0.17           miaViz_1.15.2               lattice_0.22-6              MASS_7.3-61                
#>  [13] SnowballC_0.7.1             backports_1.5.0             magrittr_2.0.3              Hmisc_5.2-1                
#>  [17] sass_0.4.9                  rmarkdown_2.29              jquerylib_0.1.4             yaml_2.3.10                
#>  [21] httpuv_1.6.15               DBI_1.2.3                   minqa_1.2.8                 RColorBrewer_1.1-3         
#>  [25] lubridate_1.9.4             abind_1.4-8                 zlibbioc_1.53.0             purrr_1.0.2                
#>  [29] ggraph_2.2.1                yulab.utils_0.1.8           nnet_7.3-19                 tweenr_2.0.3               
#>  [33] sandwich_3.1-1              circlize_0.4.16             GenomeInfoDbData_1.2.13     ggrepel_0.9.6              
#>  [37] tokenizers_0.3.0            irlba_2.3.5.1               tidytree_0.4.6              vegan_2.6-8                
#>  [41] rbiom_1.0.3                 permute_0.9-7               DelayedMatrixStats_1.29.0   codetools_0.2-20           
#>  [45] DelayedArray_0.33.3         ggforce_0.4.2               DT_0.33                     xml2_1.3.6                 
#>  [49] tidyselect_1.2.1            shape_1.4.6.1               aplot_0.2.3                 farver_2.1.2               
#>  [53] UCSC.utils_1.3.0            lme4_1.1-35.5               ScaledMatrix_1.15.0         viridis_0.6.5              
#>  [57] shinyWidgets_0.8.7          base64enc_0.1-3             jsonlite_1.8.9              GetoptLong_1.0.5           
#>  [61] BiocNeighbors_2.1.2         tidygraph_1.3.1             decontam_1.27.0             Formula_1.2-5              
#>  [65] iterators_1.0.14            foreach_1.5.2               ggnewscale_0.5.0            tools_4.5.0                
#>  [69] treeio_1.31.0               Rcpp_1.0.13-1               glue_1.8.0                  gridExtra_2.3              
#>  [73] SparseArray_1.7.2           xfun_0.49                   mgcv_1.9-1                  dplyr_1.1.4                
#>  [77] withr_3.0.2                 shinydashboard_0.7.2        BiocManager_1.30.25         fastmap_1.2.0              
#>  [81] boot_1.3-31                 bluster_1.17.0              fansi_1.0.6                 shinyjs_2.1.0              
#>  [85] digest_0.6.37               rsvd_1.0.5                  gridGraphics_0.5-1          timechange_0.3.0           
#>  [89] R6_2.5.1                    mime_0.12                   colorspace_2.1-1            listviewer_4.0.0           
#>  [93] lpSolve_5.6.23              utf8_1.2.4                  tidyr_1.3.1                 data.table_1.16.4          
#>  [97] DECIPHER_3.3.1              graphlayouts_1.2.1          httr_1.4.7                  htmlwidgets_1.6.4          
#> [101] S4Arrays_1.7.1              pkgconfig_2.0.3             gtable_0.3.6                ComplexHeatmap_2.23.0      
#> [105] janeaustenr_1.0.0           htmltools_0.5.8.1           bookdown_0.41               rintrojs_0.3.4             
#> [109] clue_0.3-66                 scales_1.3.0                png_0.1-8                   ggfun_0.1.8                
#> [113] knitr_1.49                  rstudioapi_0.17.1           reshape2_1.4.4              rjson_0.2.23               
#> [117] checkmate_2.3.2             nlme_3.1-166                nloptr_2.1.1                shinyAce_0.4.3             
#> [121] zoo_1.8-12                  cachem_1.1.0                GlobalOptions_0.1.2         stringr_1.5.1              
#> [125] parallel_4.5.0              miniUI_0.1.1.1              vipor_0.4.7                 foreign_0.8-87             
#> [129] pillar_1.9.0                grid_4.5.0                  vctrs_0.6.5                 slam_0.1-55                
#> [133] promises_1.3.2              BiocSingular_1.23.0         beachmat_2.23.5             xtable_1.8-4               
#> [137] cluster_2.1.8               beeswarm_0.4.0              htmlTable_2.4.3             evaluate_1.0.1             
#> [141] mvtnorm_1.3-2               cli_3.6.3                   compiler_4.5.0              rlang_1.1.4                
#> [145] crayon_1.5.3                tidytext_0.4.2              mediation_4.5.0             plyr_1.8.9                 
#> [149] fs_1.6.5                    ggbeeswarm_0.7.2            stringi_1.8.4               viridisLite_0.4.2          
#> [153] BiocParallel_1.41.0         munsell_0.5.1               lazyeval_0.2.2              colourpicker_1.3.0         
#> [157] Matrix_1.7-1                patchwork_1.3.0             sparseMatrixStats_1.19.0    shiny_1.10.0               
#> [161] memoise_2.0.1               igraph_2.1.2                RcppParallel_5.1.9          bslib_0.8.0                
#> [165] ggtree_3.15.0               bibtex_0.5.1                ape_5.8

5 References

Appendix

This vignette was generated using BiocStyle (Oleś, 2024) with knitr (Xie, 2024) and rmarkdown (Allaire, Xie, Dervieux et al., 2024) running behind the scenes. Citations were generated with RefManageR (McLean, 2017).

[1] J. Allaire, Y. Xie, C. Dervieux, et al. rmarkdown: Dynamic Documents for R. R package version 2.29. 2024. URL: https://github.com/rstudio/rmarkdown.

[2] M. W. McLean. “RefManageR: Import and Manage BibTeX and BibLaTeX References in R”. In: The Journal of Open Source Software (2017). DOI: 10.21105/joss.00338.

[3] A. Oleś. BiocStyle: Standard styles for vignettes and other Bioconductor documents. R package version 2.35.0. 2024. DOI: 10.18129/B9.bioc.BiocStyle. URL: https://bioconductor.org/packages/BiocStyle.

[4] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. Vienna, Austria, 2024. URL: https://www.R-project.org/.

[5] H. Wickham. “testthat: Get Started with Testing”. In: The R Journal 3 (2011), pp. 5–10. URL: https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf.

[6] Y. Xie. knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.49. 2024. URL: https://yihui.org/knitr/.