Skip to content

Commit

Permalink
updates palette
Browse files Browse the repository at this point in the history
  • Loading branch information
Geert van Geest committed Jun 17, 2024
1 parent a00beb8 commit 53ec42c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions 4_integration_clustering.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,20 @@ Now that we have selected a resolution, we can color both the UMAP and the slice
```{r}
#| warning: false
#| message: false
# define a color palette based on the number of clusters
nclust <- seu[[res]] |> unique() |> nrow()
cluster_cols <- viridis::viridis_pal(option = "H")(nclust)
cluster_cols <- DiscretePalette(nclust, palette = "polychrome")
DimPlot(seu,
group.by = res,
shuffle = TRUE,
cols = cluster_cols)
SpatialPlot(seu, group.by = res, pt.size.factor = 2) +
SpatialPlot(seu, pt.size.factor = 2) +
plot_layout(guides='collect') &
theme(legend.position = "none") &
scale_fill_viridis_d(option = "H")
scale_fill_manual(values = cluster_cols)
```

After integration and clustering, we can save the output as an rds files:
Expand Down
Binary file modified assets/images/clustering_anterior_posterior.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 53ec42c

Please sign in to comment.