From a63726131994a6b3705ce77c6f1062a226e39eae Mon Sep 17 00:00:00 2001 From: lcolladotor Date: Fri, 26 Jul 2024 14:08:30 -0400 Subject: [PATCH] Use the same colors as in the package logo. --- dev/05_make_logo.R | 4 ++-- vignettes/visiumStitched.Rmd | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/dev/05_make_logo.R b/dev/05_make_logo.R index 1521740..42930f2 100644 --- a/dev/05_make_logo.R +++ b/dev/05_make_logo.R @@ -11,9 +11,9 @@ vis_clus( clustervar = "precast_k2", is_stitched = TRUE, colors = c( - "2" = "darkblue", "1" = "gold", - "NA" = "red" + "2" = "darkblue", + "NA" = "white" ), spatial = FALSE ) diff --git a/vignettes/visiumStitched.Rmd b/vignettes/visiumStitched.Rmd index 9109aec..90afa96 100644 --- a/vignettes/visiumStitched.Rmd +++ b/vignettes/visiumStitched.Rmd @@ -436,8 +436,17 @@ and can visualize the results here, where we see a fairly seamless transition of cluster assignments across capture-area boundaries. First, let's examine `k = 2`: ```{r "precast_k2", fig.height = 4} -## PRECAST k = 2 clusters -vis_clus(spe_norm, clustervar = "precast_k2", is_stitched = TRUE) +## PRECAST k = 2 clusters with our manually chosen colors +vis_clus( + spe_norm, + clustervar = "precast_k2", + is_stitched = TRUE, + colors = c( + "1" = "gold", + "2" = "darkblue", + "NA" = "white" + ) +) ``` We can see that these two spatial clusters are differentiating the white vs the gray matter based on the white matter marker genes we [previously visualized](https://research.libd.org/visiumStitched/articles/visiumStitched.html#a-note-on-normalization). @@ -449,7 +458,7 @@ In the example data, `k = 4` and `k =8` have also been computed. Let's visualize vars <- colnames(colData(spe_norm)) vars[grep("precast", vars)] -## PRECAST k = 4 clusters +## PRECAST k = 4 clusters with default cluster colors vis_clus(spe_norm, clustervar = "precast_k4", is_stitched = TRUE) ```