Cell types composition in the full object

Published

March 18, 2026

Code
library(qs2)
library(Seurat)
library(tidyverse)
source("20260217-helper_functions.R")


full <- qs_read("seurat_objects/20260217_Part2_fullobj.qs2")
md <- full@meta.data

Cell type composition across brain regions and treatment groups

To characterise the cellular landscape captured by the Xenium 480-gene spatial transcriptomics panel, the total number of cells assigned to each major cell type (annotatedclusters) was quantified per brain region and stratified by treatment group (aducanumab, Adu; isotype control, IgG). Cell type annotations were derived from the seurat full object curated by Chloe

Code
n_cells <- md |>
  group_by(annotatedclusters,Region, Treatment.Group) |>
  summarise(n_cells = n())

ggplot(n_cells, aes(x = Region , y = n_cells, fill = Treatment.Group))+
  geom_col()+
  scale_y_continuous(labels = label_number(scale_cut = cut_short_scale()))+
  facet_wrap(~annotatedclusters, scales = "free_y", ncol = 4)+
  theme_bw()+
  theme(legend.position = "top",
  axis.text.x = element_text(angle = 40, hjust = 1))