This vignette demonstrates how to use the MultifeatureGrid
class from the MultiModalGraphics
package to create comprehensive heatmaps integrating various data features such as z-scores, p-values, and counts.
First, we create a sample dataset representing biological data across different tissues and signaling pathways, with associated p-values and activation z-scores.
We initialize the MultifeatureGrid
object with the data prepared above.
We then plot the heatmap, specifying ‘tissue’ as the independent variable for faceting.
plot_heatmap(mg, independantVariable = "tissue")
#> Warning: Removed 32 rows containing missing values or values outside the scale range
#> (`geom_point()`).
This plot provides a visual summary of the signaling activity and the statistical significance across different tissues, utilizing a color gradient to represent activation z-scores and the size of points to indicate the number of genes involved.
#> R Under development (unstable) (2025-01-20 r87609)
#> 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 LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_GB LC_COLLATE=C
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: America/New_York
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] grid stats4 stats graphics grDevices utils datasets
#> [8] methods base
#>
#> other attached packages:
#> [1] reshape_0.8.9 GetoptLong_1.0.5
#> [3] RColorBrewer_1.1-3 wesanderson_0.3.7
#> [5] ggplot2_3.5.1 gridtext_0.1.5
#> [7] circlize_0.4.16 seriation_1.5.7
#> [9] ComplexHeatmap_2.23.0 ggthemes_5.1.0
#> [11] paletteer_1.6.0 dplyr_1.1.4
#> [13] MultiAssayExperiment_1.33.9 SummarizedExperiment_1.37.0
#> [15] Biobase_2.67.0 GenomicRanges_1.59.1
#> [17] GenomeInfoDb_1.43.4 IRanges_2.41.2
#> [19] S4Vectors_0.45.2 BiocGenerics_0.53.6
#> [21] generics_0.1.3 MatrixGenerics_1.19.1
#> [23] matrixStats_1.5.0 MultiModalGraphics_0.99.0
#>
#> loaded via a namespace (and not attached):
#> [1] tidyselect_1.2.1 farver_2.1.2 fastmap_1.2.0
#> [4] TSP_1.2-4 digest_0.6.37 lifecycle_1.0.4
#> [7] cluster_2.1.8 Cairo_1.6-2 statmod_1.5.0
#> [10] magrittr_2.0.3 compiler_4.5.0 rlang_1.1.5
#> [13] sass_0.4.9 tools_4.5.0 yaml_2.3.10
#> [16] knitr_1.49 S4Arrays_1.7.1 labeling_0.4.3
#> [19] DelayedArray_0.33.4 plyr_1.8.9 xml2_1.3.6
#> [22] abind_1.4-8 registry_0.5-1 ca_0.71.1
#> [25] withr_3.0.2 purrr_1.0.2 colorspace_2.1-1
#> [28] scales_1.3.0 iterators_1.0.14 cli_3.6.3
#> [31] rmarkdown_2.29 crayon_1.5.3 httr_1.4.7
#> [34] rjson_0.2.23 BiocBaseUtils_1.9.0 cachem_1.1.0
#> [37] stringr_1.5.1 parallel_4.5.0 XVector_0.47.2
#> [40] vctrs_0.6.5 Matrix_1.7-2 jsonlite_1.8.9
#> [43] gclus_1.3.2 clue_0.3-66 magick_2.8.5
#> [46] foreach_1.5.2 limma_3.63.3 jquerylib_0.1.4
#> [49] glue_1.8.0 rematch2_2.1.2 codetools_0.2-20
#> [52] stringi_1.8.4 shape_1.4.6.1 gtable_0.3.6
#> [55] UCSC.utils_1.3.1 munsell_0.5.1 tibble_3.2.1
#> [58] pillar_1.10.1 htmltools_0.5.8.1 GenomeInfoDbData_1.2.13
#> [61] R6_2.5.1 doParallel_1.0.17 evaluate_1.0.3
#> [64] lattice_0.22-6 png_0.1-8 bslib_0.9.0
#> [67] Rcpp_1.0.14 SparseArray_1.7.4 xfun_0.50
#> [70] pkgconfig_2.0.3 GlobalOptions_0.1.2