Setup: Libraries, Objects

These libraries and objects are used in Figures 2, 4, and 5.

Libraries

# Unique list of library calls
library(cowplot)
library(tidyverse)
library(grid)
library(gridExtra)
library(muscat)
library(purrr)
library(SingleCellExperiment)
library(UpSetR)
library(Seurat)
library(ComplexHeatmap)
library(circlize)
library(viridis)
library(ggridges)
library(dplyr)
library(imager)

Metadata

samples.df <- readRDS("~/data/Followup/metadata.rds")

samples.df

scRNA-seq Astro Object

so.astro <- readRDS("~/data/Followup/so.astro.rds")

so.astro@meta.data$ident <- as.factor(so.astro@meta.data$integrated_snn_res.0.2)

# 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

clusters
##  [1] 0 1 2 3 4 5 6 7 8 9

scRNA-seq Markers Object

astro.markers <- readRDS("~/data/Followup/astro.markers.v1.rds") %>% 
                         remove_rownames() %>% 
                         mutate(gene.name = word(gene, 2, sep = "\\."))

head(astro.markers)

Visium Spatial objects

Their were six spatial transcriptomics samples in the paper, three Saline and three LPS. From Extended Data Fig. 4 Qc and validation of six Visium spatial transcriptomics sections from saline- and LPS-treated animals: