so.astro <- readRDS(file.path(wd, objects.dir, "SO_astrocytes_clustered.rds"))
# Prepare a vector of colors for the clusters
clusters <- levels(Idents(so.astro)) %>% as.numeric()
cluster.cols <- muscat:::.cluster_colors[seq_along(clusters)]
names(cluster.cols) <- clusters
so.astro
An object of class Seurat
14491 features across 83353 samples within 2 assays
Active assay: integrated (2000 features)
1 other assay present: RNA
2 dimensional reductions calculated: pca, tsne
DimPlot(so.astro, reduction = "tsne", group.by = "ident", split.by = "group_id") +
scale_color_manual(values = cluster.cols)