diff --git a/README.html b/README.html index 60436bbe..539d01cf 100644 --- a/README.html +++ b/README.html @@ -769,14 +769,14 @@

align_dendro

ggheatmap(small_mat) +
   hmanno("t") +
   align_dendro()
- +

You can use the distance and method argument to control the dendrogram builind proce.

ggheatmap(small_mat) +
   hmanno("t") +
   align_dendro(method = "ward.D2")
- +

One useful function of dendrogram is to cut the columns/rows into groups. You can specify k or h, which works @@ -784,7 +784,7 @@

align_dendro

ggheatmap(small_mat) +
   hmanno("t") +
   align_dendro(k = 3L)
- +

In contrast to align_group, align_kmeans, and align_reorder, align_dendro is capable of @@ -797,7 +797,7 @@

align_dendro

hmanno("t") + align_dendro() + geom_point(aes(y = y)) - +

align_dendro will create a default node data for the ggplot. See ?dendrogram_data for details. In @@ -810,7 +810,7 @@

align_dendro

hmanno("t") + align_dendro(aes(color = branch), k = 3) + geom_point(aes(color = branch, y = y)) - +

align_dendro is also capable of performing clustering between groups. This means that you can use it even if there are already @@ -820,7 +820,7 @@

align_dendro

hmanno("t") + align_group(column_groups) + align_dendro(aes(color = branch)) - +

You can reorder the groups by setting reorder_group = TRUE.

@@ -828,7 +828,7 @@

align_dendro

hmanno("t") + align_group(column_groups) + align_dendro(aes(color = branch), reorder_group = TRUE) - +

You can see the difference.

ggheatmap(small_mat) +
@@ -837,7 +837,7 @@ 

align_dendro

align_dendro(aes(color = branch), reorder_group = TRUE) + hmanno("b") + align_dendro(aes(color = branch), reorder_group = FALSE)
- +

It is important to understand that when reorder_group = FALSE is used, the reordering of the @@ -896,7 +896,7 @@

align_gg

) + scale_fill_brewer(palette = "Set1") + scale_x_reverse() - +

Control size

The different ggplot objects were combined using the @@ -927,7 +927,7 @@

Control size

) + scale_fill_brewer(palette = "Set1", guide = "none") + scale_x_reverse() - +

restriction

The position scales and facets are partial support.

@@ -964,7 +964,7 @@

restriction

hmanno("t") + align_dendro(aes(color = branch), k = 3) + geom_point(aes(y = y)) - +

Session information

sessionInfo()
@@ -991,16 +991,20 @@ 

Session information

#> [1] ggalign_0.0.1 ggplot2_3.5.1 #> #> loaded via a namespace (and not attached): -#> [1] gtable_0.3.5 dplyr_1.1.4 compiler_4.4.0 highr_0.11 -#> [5] tidyselect_1.2.1 tidyr_1.3.1 scales_1.3.0 yaml_2.3.8 -#> [9] fastmap_1.2.0 ggh4x_0.2.8 R6_2.5.1 labeling_0.4.3 -#> [13] generics_0.1.3 patchwork_1.2.0 knitr_1.47 tibble_3.2.1 -#> [17] munsell_0.5.1 pillar_1.9.0 RColorBrewer_1.1-3 rlang_1.1.4 -#> [21] utf8_1.2.4 xfun_0.45 viridisLite_0.4.2 cli_3.6.3 -#> [25] withr_3.0.0 magrittr_2.0.3 digest_0.6.36 grid_4.4.0 -#> [29] lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.24.0 glue_1.7.0 -#> [33] farver_2.1.2 fansi_1.0.6 colorspace_2.1-0 rmarkdown_2.27 -#> [37] purrr_1.0.2 tools_4.4.0 pkgconfig_2.0.3 htmltools_0.5.8.1
+#> [1] gtable_0.3.5 dplyr_1.1.4 compiler_4.4.0 +#> [4] highr_0.11 tidyselect_1.2.1 tidyr_1.3.1 +#> [7] scales_1.3.0 yaml_2.3.8 fastmap_1.2.0 +#> [10] ggh4x_0.2.8 R6_2.5.1 labeling_0.4.3 +#> [13] generics_0.1.3 patchwork_1.2.0.9000 knitr_1.47 +#> [16] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 +#> [19] RColorBrewer_1.1-3 rlang_1.1.4 utf8_1.2.4 +#> [22] xfun_0.45 viridisLite_0.4.2 cli_3.6.3 +#> [25] withr_3.0.0 magrittr_2.0.3 digest_0.6.36 +#> [28] grid_4.4.0 lifecycle_1.0.4 vctrs_0.6.5 +#> [31] evaluate_0.24.0 glue_1.7.0 farver_2.1.2 +#> [34] fansi_1.0.6 colorspace_2.1-0 rmarkdown_2.27 +#> [37] purrr_1.0.2 tools_4.4.0 pkgconfig_2.0.3 +#> [40] htmltools_0.5.8.1 diff --git a/README.md b/README.md index f9c035ae..034df2e9 100644 --- a/README.md +++ b/README.md @@ -495,14 +495,18 @@ sessionInfo() #> [1] ggalign_0.0.1 ggplot2_3.5.1 #> #> loaded via a namespace (and not attached): -#> [1] gtable_0.3.5 dplyr_1.1.4 compiler_4.4.0 highr_0.11 -#> [5] tidyselect_1.2.1 tidyr_1.3.1 scales_1.3.0 yaml_2.3.8 -#> [9] fastmap_1.2.0 ggh4x_0.2.8 R6_2.5.1 labeling_0.4.3 -#> [13] generics_0.1.3 patchwork_1.2.0 knitr_1.47 tibble_3.2.1 -#> [17] munsell_0.5.1 pillar_1.9.0 RColorBrewer_1.1-3 rlang_1.1.4 -#> [21] utf8_1.2.4 xfun_0.45 viridisLite_0.4.2 cli_3.6.3 -#> [25] withr_3.0.0 magrittr_2.0.3 digest_0.6.36 grid_4.4.0 -#> [29] lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.24.0 glue_1.7.0 -#> [33] farver_2.1.2 fansi_1.0.6 colorspace_2.1-0 rmarkdown_2.27 -#> [37] purrr_1.0.2 tools_4.4.0 pkgconfig_2.0.3 htmltools_0.5.8.1 +#> [1] gtable_0.3.5 dplyr_1.1.4 compiler_4.4.0 +#> [4] highr_0.11 tidyselect_1.2.1 tidyr_1.3.1 +#> [7] scales_1.3.0 yaml_2.3.8 fastmap_1.2.0 +#> [10] ggh4x_0.2.8 R6_2.5.1 labeling_0.4.3 +#> [13] generics_0.1.3 patchwork_1.2.0.9000 knitr_1.47 +#> [16] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 +#> [19] RColorBrewer_1.1-3 rlang_1.1.4 utf8_1.2.4 +#> [22] xfun_0.45 viridisLite_0.4.2 cli_3.6.3 +#> [25] withr_3.0.0 magrittr_2.0.3 digest_0.6.36 +#> [28] grid_4.4.0 lifecycle_1.0.4 vctrs_0.6.5 +#> [31] evaluate_0.24.0 glue_1.7.0 farver_2.1.2 +#> [34] fansi_1.0.6 colorspace_2.1-0 rmarkdown_2.27 +#> [37] purrr_1.0.2 tools_4.4.0 pkgconfig_2.0.3 +#> [40] htmltools_0.5.8.1 ``` diff --git a/man/figures/README-unnamed-chunk-18-1.png b/man/figures/README-unnamed-chunk-18-1.png index 715e9e7e..ab641535 100644 Binary files a/man/figures/README-unnamed-chunk-18-1.png and b/man/figures/README-unnamed-chunk-18-1.png differ diff --git a/man/figures/README-unnamed-chunk-19-1.png b/man/figures/README-unnamed-chunk-19-1.png index 7f7dfa32..fc021693 100644 Binary files a/man/figures/README-unnamed-chunk-19-1.png and b/man/figures/README-unnamed-chunk-19-1.png differ diff --git a/man/figures/README-unnamed-chunk-20-1.png b/man/figures/README-unnamed-chunk-20-1.png index 8ea939a7..be46ddf6 100644 Binary files a/man/figures/README-unnamed-chunk-20-1.png and b/man/figures/README-unnamed-chunk-20-1.png differ diff --git a/man/figures/README-unnamed-chunk-21-1.png b/man/figures/README-unnamed-chunk-21-1.png index df49f407..63bb4e69 100644 Binary files a/man/figures/README-unnamed-chunk-21-1.png and b/man/figures/README-unnamed-chunk-21-1.png differ diff --git a/man/figures/README-unnamed-chunk-22-1.png b/man/figures/README-unnamed-chunk-22-1.png index f0bcab01..98c413dd 100644 Binary files a/man/figures/README-unnamed-chunk-22-1.png and b/man/figures/README-unnamed-chunk-22-1.png differ diff --git a/man/figures/README-unnamed-chunk-23-1.png b/man/figures/README-unnamed-chunk-23-1.png index 3002a0da..d224eeb6 100644 Binary files a/man/figures/README-unnamed-chunk-23-1.png and b/man/figures/README-unnamed-chunk-23-1.png differ diff --git a/man/figures/README-unnamed-chunk-24-1.png b/man/figures/README-unnamed-chunk-24-1.png index 1d0d8613..03a2741f 100644 Binary files a/man/figures/README-unnamed-chunk-24-1.png and b/man/figures/README-unnamed-chunk-24-1.png differ diff --git a/man/figures/README-unnamed-chunk-25-1.png b/man/figures/README-unnamed-chunk-25-1.png index 13965c37..4ebe0d65 100644 Binary files a/man/figures/README-unnamed-chunk-25-1.png and b/man/figures/README-unnamed-chunk-25-1.png differ diff --git a/man/figures/README-unnamed-chunk-27-1.png b/man/figures/README-unnamed-chunk-27-1.png index 20016219..82fa519d 100644 Binary files a/man/figures/README-unnamed-chunk-27-1.png and b/man/figures/README-unnamed-chunk-27-1.png differ diff --git a/man/figures/README-unnamed-chunk-28-1.png b/man/figures/README-unnamed-chunk-28-1.png index 7bdf111a..9a0b1c30 100644 Binary files a/man/figures/README-unnamed-chunk-28-1.png and b/man/figures/README-unnamed-chunk-28-1.png differ diff --git a/man/figures/README-unnamed-chunk-32-1.png b/man/figures/README-unnamed-chunk-32-1.png index f0bcab01..98c413dd 100644 Binary files a/man/figures/README-unnamed-chunk-32-1.png and b/man/figures/README-unnamed-chunk-32-1.png differ diff --git a/man/heatmap-and.Rd b/man/heatmap-and.Rd index ffcda2df..72a64dd2 100644 --- a/man/heatmap-and.Rd +++ b/man/heatmap-and.Rd @@ -18,7 +18,9 @@ A modified \code{LayoutHeatmap} object. } \description{ -Add components to heatmap and heatmap annotations +If the active context is the heatmap body, this will add the object for +heatmap and all annotations. Otherwise, it'll add the object for current +active context only. } \seealso{ \link{layout_heatmap_and_add}