Spatial Transcriptomics

Seurat Toolkit

Combining single-cell gene expression data with spatial information to reveal the spatial distribution of gene activity within tissues.
Authors

Åsa Björklund

Paulo Czarnewski

Susanne Reinsbach

Roy Francis

Published

05-Feb-2024

Note

Code chunks run R commands unless otherwise specified.

This tutorial is adapted from the Seurat vignette.

Spatial transcriptomic data with the Visium platform is in many ways similar to scRNAseq data. It contains UMI counts for 5-20 cells instead of single cells, but is still quite sparse in the same way as scRNAseq data is, but with the additional information about spatial location in the tissue.
Here we will first run quality control in a similar manner to scRNAseq data, then QC filtering, dimensionality reduction, integration and clustering. Then we will use scRNAseq data from mouse cortex to run label transfer to predict celltypes in the Visium spots.
We will use two Visium spatial transcriptomics dataset of the mouse brain (Sagittal), which are publicly available from the 10x genomics website. Note, that these dataset have already been filtered for spots that does not overlap with the tissue.

1 Preparation

Load packages

# remotes::install_github('satijalab/seurat-data', dependencies=FALSE)

suppressPackageStartupMessages({
    library(Matrix)
    library(dplyr)
    library(SeuratData)
    library(Seurat)
    library(ggplot2)
    library(patchwork)
    library(dplyr)
})

Load ST data

The package SeuratData has some seurat objects for different datasets. Among those are spatial transcriptomics data from mouse brain and kidney. Here we will download and process sections from the mouse brain.

# download pre-computed data if missing or long compute
fetch_data <- TRUE

# url for source and intermediate data
path_data <- "https://export.uppmax.uu.se/naiss2023-23-3/workshops/workshop-scrnaseq"

outdir <- "data/spatial/"
if (!dir.exists(outdir)) dir.create(outdir, showWarnings = F)

# to list available datasets in SeuratData you can run AvailableData()

# first we dowload the dataset
if (!("stxBrain.SeuratData" %in% rownames(SeuratData::InstalledData()))) {
    InstallData("stxBrain")
}

# now we can list what datasets we have downloaded
InstalledData()
# now we will load the seurat object for one section
brain1 <- LoadData("stxBrain", type = "anterior1")
brain2 <- LoadData("stxBrain", type = "posterior1")

Merge into one seurat object

brain <- merge(brain1, brain2)
brain
An object of class Seurat 
31053 features across 6049 samples within 1 assay 
Active assay: Spatial (31053 features, 0 variable features)
 2 images present: anterior1, posterior1

As you can see, now we do not have the assay RNA, but instead an assay called Spatial.

2 Quality control

Similar to scRNA-seq we use statistics on number of counts, number of features and percent mitochondria for quality control.

Now the counts and feature counts are calculated on the Spatial assay, so they are named nCount_Spatial and nFeature_Spatial.

brain <- PercentageFeatureSet(brain, "^mt-", col.name = "percent_mito")
brain <- PercentageFeatureSet(brain, "^Hb.*-", col.name = "percent_hb")

VlnPlot(brain, features = c("nCount_Spatial", "nFeature_Spatial", "percent_mito", "percent_hb"), pt.size = 0.1, ncol = 2) + NoLegend()

We can also plot the same data onto the tissue section.

SpatialFeaturePlot(brain, features = c("nCount_Spatial", "nFeature_Spatial", "percent_mito", "percent_hb"))

As you can see, the spots with low number of counts/features and high mitochondrial content are mainly towards the edges of the tissue. It is quite likely that these regions are damaged tissue. You may also see regions within a tissue with low quality if you have tears or folds in your section.
But remember, for some tissue types, the amount of genes expressed and proportion mitochondria may also be a biological features, so bear in mind what tissue you are working on and what these features mean.

2.1 Filter spots

Select all spots with less than 25% mitocondrial reads, less than 20% hb-reads and 500 detected genes. You must judge for yourself based on your knowledge of the tissue what are appropriate filtering criteria for your dataset.

brain <- brain[, brain$nFeature_Spatial > 500 & brain$percent_mito < 25 & brain$percent_hb < 20]

And replot onto tissue section:

SpatialFeaturePlot(brain, features = c("nCount_Spatial", "nFeature_Spatial", "percent_mito"))

2.2 Top expressed genes

As for scRNA-seq data, we will look at what the top expressed genes are.

C <- GetAssayData(brain, assay = "Spatial", slot = "counts")
C@x <- C@x / rep.int(colSums(C), diff(C@p))
most_expressed <- order(Matrix::rowSums(C), decreasing = T)[20:1]
boxplot(as.matrix(t(C[most_expressed, ])),
    cex = 0.1, las = 1, xlab = "% total count per cell",
    col = (scales::hue_pal())(20)[20:1], horizontal = TRUE
)

rm(C)
gc()
            used   (Mb) gc trigger   (Mb)  max used   (Mb)
Ncells   3360409  179.5    5248368  280.3   5248368  280.3
Vcells 189921573 1449.0  375078628 2861.7 357748573 2729.5

As you can see, the mitochondrial genes are among the top expressed genes. Also the lncRNA gene Bc1 (brain cytoplasmic RNA 1). Also one hemoglobin gene.

2.3 Filter genes

We will remove the Bc1 gene, hemoglobin genes (blood contamination) and the mitochondrial genes.

dim(brain)
[1] 31053  5789
# Filter Bl1
brain <- brain[!grepl("Bc1", rownames(brain)), ]

# Filter Mitocondrial
brain <- brain[!grepl("^mt-", rownames(brain)), ]

# Filter Hemoglobin gene (optional if that is a problem on your data)
brain <- brain[!grepl("^Hb.*-", rownames(brain)), ]

dim(brain)
[1] 31031  5789

3 Analysis

We will proceed with the data in a very similar manner to scRNA-seq data.

For ST data, the Seurat team recommends to use SCTransform() for normalization, so we will do that. SCTransform() will select variable genes and normalize in one step.

brain <- SCTransform(brain, assay = "Spatial", method = "poisson", verbose = TRUE)

Now we can plot gene expression of individual genes, the gene Hpca is a strong hippocampal marker and Ttr is a marker of the choroid plexus.

SpatialFeaturePlot(brain, features = c("Hpca", "Ttr"))

If you want to see the tissue better you can modify point size and transparency of the points.

SpatialFeaturePlot(brain, features = "Ttr", pt.size.factor = 1, alpha = c(0.1, 1))

3.1 Dimensionality reduction and clustering

We can then now run dimensionality reduction and clustering using the same workflow as we use for scRNA-seq analysis.

But make sure you run it on the SCT assay.

brain <- RunPCA(brain, assay = "SCT", verbose = FALSE)
brain <- FindNeighbors(brain, reduction = "pca", dims = 1:30)
brain <- FindClusters(brain, verbose = FALSE)
brain <- RunUMAP(brain, reduction = "pca", dims = 1:30)

We can then plot clusters onto umap or onto the tissue section.

DimPlot(brain, reduction = "umap", group.by = c("ident", "orig.ident"))

SpatialDimPlot(brain)

We can also plot each cluster separately

SpatialDimPlot(brain, cells.highlight = CellsByIdentities(brain), facet.highlight = TRUE, ncol = 5)

3.2 Integration

Quite often, there are strong batch effects between different ST sections, so it may be a good idea to integrate the data across sections.

We will do a similar integration as in the Data Integration lab, but this time we will use the SCT assay for integration. Therefore we need to run PrepSCTIntegration() which will compute the sctransform residuals for all genes in both the datasets.

# create a list of the original data that we loaded to start with
st.list <- list(anterior1 = brain1, posterior1 = brain2)

# run SCT on both datasets
st.list <- lapply(st.list, SCTransform, assay = "Spatial", method = "poisson")

# need to set maxSize for PrepSCTIntegration to work
options(future.globals.maxSize = 2000 * 1024^2) # set allowed size to 2K MiB

st.features <- SelectIntegrationFeatures(st.list, nfeatures = 3000, verbose = FALSE)
st.list <- PrepSCTIntegration(object.list = st.list, anchor.features = st.features, verbose = FALSE)

Now we can perform the actual integration.

int.anchors <- FindIntegrationAnchors(object.list = st.list, normalization.method = "SCT", verbose = FALSE, anchor.features = st.features)
brain.integrated <- IntegrateData(anchorset = int.anchors, normalization.method = "SCT", verbose = FALSE)

rm(int.anchors, st.list)
gc()
            used   (Mb) gc trigger   (Mb)   max used   (Mb)
Ncells   3530321  188.6    5248368  280.3    5248368  280.3
Vcells 546165692 4167.0 1148292444 8760.8 1147466814 8754.5

Then we run dimensionality reduction and clustering as before.

brain.integrated <- RunPCA(brain.integrated, verbose = FALSE)
brain.integrated <- FindNeighbors(brain.integrated, dims = 1:30)
brain.integrated <- FindClusters(brain.integrated, verbose = FALSE)
brain.integrated <- RunUMAP(brain.integrated, dims = 1:30)
DimPlot(brain.integrated, reduction = "umap", group.by = c("ident", "orig.ident"))

SpatialDimPlot(brain.integrated)

Discuss

Do you see any differences between the integrated and non-integrated clustering? Judge for yourself, which of the clusterings do you think looks best? As a reference, you can compare to brain regions in the Allen brain atlas.

3.3 Spatially Variable Features

There are two main workflows to identify molecular features that correlate with spatial location within a tissue. The first is to perform differential expression based on spatially distinct clusters, the other is to find features that have spatial patterning without taking clusters or spatial annotation into account. First, we will do differential expression between clusters just as we did for the scRNAseq data before.

# differential expression between cluster 1 and cluster 6
de_markers <- FindMarkers(brain.integrated, ident.1 = 5, ident.2 = 6)

# plot top markers
SpatialFeaturePlot(object = brain.integrated, features = rownames(de_markers)[1:3], alpha = c(0.1, 1), ncol = 3)

Spatial transcriptomics allows researchers to investigate how gene expression trends varies in space, thus identifying spatial patterns of gene expression. For this purpose there are multiple methods, such as SpatailDE, SPARK, Trendsceek, HMRF and Splotch.

In FindSpatiallyVariables() the default method in Seurat (method = ‘markvariogram’), is inspired by the Trendsceek, which models spatial transcriptomics data as a mark point process and computes a ‘variogram’, which identifies genes whose expression level is dependent on their spatial location. More specifically, this process calculates gamma(r) values measuring the dependence between two spots a certain “r” distance apart. By default, we use an r-value of ‘5’ in these analyses, and only compute these values for variable genes (where variation is calculated independently of spatial location) to save time.

Caution

Takes a long time to run, so skip this step for now!

# brain <- FindSpatiallyVariableFeatures(brain, assay = "SCT", features = VariableFeatures(brain)[1:1000],
#     selection.method = "markvariogram")

# We would get top features from SpatiallyVariableFeatures
# top.features <- head(SpatiallyVariableFeatures(brain, selection.method = "markvariogram"), 6)

4 Single cell data

We can use a scRNA-seq dataset as a reference to predict the proportion of different celltypes in the Visium spots. Keep in mind that it is important to have a reference that contains all the celltypes you expect to find in your spots. Ideally it should be a scRNA-seq reference from the exact same tissue. We will use a reference scRNA-seq dataset of ~14,000 adult mouse cortical cell taxonomy from the Allen Institute, generated with the SMART-Seq2 protocol.

First download the seurat data:

if (!dir.exists("data/spatial/visium")) dir.create("data/spatial/visium", recursive = TRUE)
path_file <- "data/spatial/visium/allen_cortex.rds"
if (!file.exists(path_file)) download.file(url = file.path(path_data, "spatial/visium/allen_cortex.rds"), destfile = path_file)

For speed, and for a more fair comparison of the celltypes, we will subsample all celltypes to a maximum of 200 cells per class (subclass).

ar <- readRDS("data/spatial/visium/allen_cortex.rds")

# check number of cells per subclass
table(ar$subclass)

     Astro         CR       Endo    L2/3 IT         L4      L5 IT      L5 PT 
       368          7         94        982       1401        880        544 
     L6 CT      L6 IT        L6b      Lamp5 Macrophage      Meis2         NP 
       960       1872        358       1122         51         45        362 
     Oligo       Peri      Pvalb   Serpinf1        SMC       Sncg        Sst 
        91         32       1337         27         55        125       1741 
       Vip       VLMC 
      1728         67 
# select 200 cells per subclass, fist set subclass ass active.ident
Idents(ar) <- ar$subclass
ar <- subset(ar, cells = WhichCells(ar, downsample = 200))

# check again number of cells per subclass
table(ar$subclass)

     Astro         CR       Endo    L2/3 IT         L4      L5 IT      L5 PT 
       200          7         94        200        200        200        200 
     L6 CT      L6 IT        L6b      Lamp5 Macrophage      Meis2         NP 
       200        200        200        200         51         45        200 
     Oligo       Peri      Pvalb   Serpinf1        SMC       Sncg        Sst 
        91         32        200         27         55        125        200 
       Vip       VLMC 
       200         67 

Then run normalization and dimensionality reduction.

# First run SCTransform and PCA
ar <- SCTransform(ar, ncells = 3000, verbose = FALSE, method = "poisson") %>%
    RunPCA(verbose = FALSE) %>%
    RunUMAP(dims = 1:30)

# the annotation is stored in the 'subclass' column of object metadata
DimPlot(ar, label = TRUE)

5 Subset ST for cortex

Since the scRNAseq dataset was generated from the mouse cortex, we will subset the visium dataset in order to select mainly the spots part of the cortex. Note that the integration can also be performed on the whole brain slice, but it would give rise to false positive cell type assignments and therefore it should be interpreted with more care.

# subset for the anterior dataset
cortex <- subset(brain.integrated, subset = orig.ident == "anterior1")

# there seems to be an error in the subsetting, so the posterior1 image is not removed, do it manually
cortex@images$posterior1 <- NULL

# add coordinates to metadata
# note that this only returns one slide by default
cortex$imagerow <- GetTissueCoordinates(cortex)$imagerow
cortex$imagecol <- GetTissueCoordinates(cortex)$imagecol

# subset for a specific region
cortex <- subset(cortex, subset = imagerow > 400 | imagecol < 150, invert = TRUE)
cortex <- subset(cortex, subset = imagerow > 275 & imagecol > 370, invert = TRUE)
cortex <- subset(cortex, subset = imagerow > 250 & imagecol > 440, invert = TRUE)

# also subset for Frontal cortex clusters
cortex <- subset(cortex, subset = seurat_clusters %in% c(1, 2, 3, 4, 5))

p1 <- SpatialDimPlot(cortex, crop = TRUE)
p2 <- SpatialDimPlot(cortex, crop = FALSE, pt.size.factor = 1, label.size = 3)
p1 + p2

6 Deconvolution

Deconvolution is a method to estimate the abundance (or proportion) of different celltypes in a bulkRNAseq dataset using a single cell reference. As the Visium data can be seen as a small bulk, we can both use methods for traditional bulkRNAseq as well as methods especially developed for Visium data. Some methods for deconvolution are DWLS, cell2location, Tangram, Stereoscope, RCTD, SCDC and many more.

Here we will use SCDC for deconvolution of celltypes in the Visium spots. For more information on the tool please check their website: https://meichendong.github.io/SCDC/articles/SCDC.html. First, make sure the packages you need are installed.

inst <- installed.packages()

if (!("xbioc" %in% rownames(inst))) {
    remotes::install_github("renozao/xbioc", dependencies = FALSE)
}
if (!("SCDC" %in% rownames(inst))) {
    remotes::install_github("meichendong/SCDC", dependencies = FALSE)
}

suppressPackageStartupMessages(library(SCDC))
suppressPackageStartupMessages(library(Biobase))

6.1 Select genes for deconvolution

Most deconvolution methods does a prior gene selection and there are different options that are used: - Use variable genes in the SC data. - Use variable genes in both SC and ST data - DE genes between clusters in the SC data.
In this case we will use top DE genes per cluster, so first we have to run DGE detection on the scRNAseq data.

For SCDC we want to find unique markers per cluster, so we select top 20 DEGs per cluster. Ideally you should run with a larger set of genes, perhaps 100 genes per cluster to get better results. However, for the sake of speed, we are now selecting only top20 genes and it still takes about 10 minutes to run.

ar@active.assay <- "RNA"

markers_sc <- FindAllMarkers(ar,
    only.pos = TRUE,
    logfc.threshold = 0.1,
    test.use = "wilcox",
    min.pct = 0.05,
    min.diff.pct = 0.1,
    max.cells.per.ident = 200,
    return.thresh = 0.05,
    assay = "RNA"
)

# Filter for genes that are also present in the ST data
markers_sc <- markers_sc[markers_sc$gene %in% rownames(cortex), ]


# Select top 20 genes per cluster, select top by first p-value, then absolute diff in pct, then quota of pct.
markers_sc$pct.diff <- markers_sc$pct.1 - markers_sc$pct.2
markers_sc$log.pct.diff <- log2((markers_sc$pct.1 * 99 + 1) / (markers_sc$pct.2 * 99 + 1))
markers_sc %>%
    group_by(cluster) %>%
    top_n(-100, p_val) %>%
    top_n(50, pct.diff) %>%
    top_n(20, log.pct.diff) -> top20
m_feats <- unique(as.character(top20$gene))

6.2 Create Expression Sets

For SCDC both the SC and the ST data need to be in the format of an Expression set with the count matrices as AssayData. We also subset the matrices for the genes we selected in the previous step.

eset_SC <- ExpressionSet(
    assayData = as.matrix(ar@assays$RNA@counts[m_feats, ]),
    phenoData = AnnotatedDataFrame(ar@meta.data)
)
eset_ST <- ExpressionSet(assayData = as.matrix(cortex@assays$Spatial@counts[m_feats, ]), phenoData = AnnotatedDataFrame(cortex@meta.data))

6.3 Deconvolve

We then run the deconvolution defining the celltype of interest as “subclass” column in the single cell data.

Caution

This is a slow compute intensive step, we will not run this now and instead use a pre-computed file in the step below.

# this code block is not executed

# fetch_data is defined at the top of this document
if (!fetch_data) {
  deconvolution_crc <- SCDC::SCDC_prop(
    bulk.eset = eset_ST,
    sc.eset = eset_SC,
    ct.varname = "subclass",
    ct.sub = as.character(unique(eset_SC$subclass))
  )
  saveRDS(deconvolution_crc, "data/spatial/visium/seurat_scdc.rds")
}

Download the precomputed file.

# fetch_data is defined at the top of this document
path_file <- "data/spatial/visium/seurat_scdc.rds"
if (fetch_data) {
  if (!file.exists(path_file)) download.file(url = file.path(path_data, "spatial/visium/results/seurat_scdc.rds"), destfile = path_file)
}
deconvolution_crc <- readRDS(path_file)

Now we have a matrix with predicted proportions of each celltypes for each visium spot in prop.est.mvw.

head(deconvolution_crc$prop.est.mvw)
                     Lamp5 Sncg Serpinf1          Vip          Sst      Pvalb
AAACTCGTGATATAAG-1_1     0    0        0 0.000000e+00 0.0003020068 0.00000000
AAACTGCTGGCTCCAA-1_1     0    0        0 0.000000e+00 0.1544641392 0.07943494
AAAGGGATGTAGCAAG-1_1     0    0        0 0.000000e+00 0.2742639441 0.00000000
AAATACCTATAAGCAT-1_1     0    0        0 0.000000e+00 0.0803576731 0.40436150
AAATCGTGTACCACAA-1_1     0    0        0 0.000000e+00 0.0692640621 0.00000000
AAATGATTCGATCAGC-1_1     0    0        0 1.705303e-06 0.0169468859 0.08888082
                           Endo         Peri        L6 CT          L6b
AAACTCGTGATATAAG-1_1 0.00000000 0.000000e+00 0.0000000000 1.512806e-01
AAACTGCTGGCTCCAA-1_1 0.02562850 0.000000e+00 0.0280520546 1.959849e-05
AAAGGGATGTAGCAAG-1_1 0.01131595 0.000000e+00 0.0000000000 0.000000e+00
AAATACCTATAAGCAT-1_1 0.07365610 1.399958e-05 0.0036921008 0.000000e+00
AAATCGTGTACCACAA-1_1 0.02785003 5.235782e-06 0.0002147064 2.458057e-01
AAATGATTCGATCAGC-1_1 0.01403814 2.633453e-02 0.2657130174 0.000000e+00
                            L6 IT CR    L2/3 IT        L5 PT NP        L4
AAACTCGTGATATAAG-1_1 0.000000e+00  0 0.00000000 0.0000000000  0 0.0000000
AAACTGCTGGCTCCAA-1_1 1.699877e-05  0 0.38974934 0.0000000000  0 0.0000000
AAAGGGATGTAGCAAG-1_1 2.237113e-04  0 0.00000000 0.0000000000  0 0.1814651
AAATACCTATAAGCAT-1_1 0.000000e+00  0 0.00000000 0.0000793099  0 0.0000000
AAATCGTGTACCACAA-1_1 2.755082e-05  0 0.31058665 0.0000000000  0 0.0000000
AAATGATTCGATCAGC-1_1 1.350970e-01  0 0.01172995 0.1013133001  0 0.1530583
                           Oligo      L5 IT Meis2      Astro  Macrophage VLMC
AAACTCGTGATATAAG-1_1 0.606350282 0.00000000     0 0.00000000 0.242067127    0
AAACTGCTGGCTCCAA-1_1 0.070102264 0.00000000     0 0.20493666 0.047592071    0
AAAGGGATGTAGCAAG-1_1 0.000000000 0.36553725     0 0.15879807 0.008395941    0
AAATACCTATAAGCAT-1_1 0.090470397 0.00000000     0 0.32968096 0.017682500    0
AAATCGTGTACCACAA-1_1 0.205850104 0.00000000     0 0.11515601 0.025239945    0
AAATGATTCGATCAGC-1_1 0.002151596 0.09261913     0 0.08687805 0.005237623    0
                              SMC
AAACTCGTGATATAAG-1_1 0.000000e+00
AAACTGCTGGCTCCAA-1_1 3.440261e-06
AAAGGGATGTAGCAAG-1_1 0.000000e+00
AAATACCTATAAGCAT-1_1 5.461144e-06
AAATCGTGTACCACAA-1_1 0.000000e+00
AAATGATTCGATCAGC-1_1 0.000000e+00

Now we take the deconvolution output and add it to the Seurat object as a new assay.

cortex@assays[["SCDC"]] <- CreateAssayObject(data = t(deconvolution_crc$prop.est.mvw))

# Seems to be a bug in SeuratData package that the key is not set and any plotting function etc. will throw an error.
if (length(cortex@assays$SCDC@key) == 0) {
    cortex@assays$SCDC@key <- "scdc_"
}
DefaultAssay(cortex) <- "SCDC"
SpatialFeaturePlot(cortex, features = c("L2/3 IT", "L4"), pt.size.factor = 1.6, ncol = 2, crop = TRUE)

Based on these prediction scores, we can also predict cell types whose location is spatially restricted. We use the same methods based on marked point processes to define spatially variable features, but use the cell type prediction scores as the “marks” rather than gene expression.

# FindSpatiallyVariableFeatures() does not work with markvariogram or moransi
# this chunk is disabled

cortex <- FindSpatiallyVariableFeatures(cortex,
    assay = "SCDC", selection.method = "markvariogram",
    features = rownames(cortex), r.metric = 5, slot = "data"
)
top.clusters <- head(SpatiallyVariableFeatures(cortex), 4)
SpatialPlot(object = cortex, features = top.clusters, ncol = 2)

We can also visualize the scores per cluster in ST data.

# this chunk is disabled

VlnPlot(cortex, group.by = "seurat_clusters", features = top.clusters, pt.size = 0, ncol = 2)

Keep in mind that the deconvolution results are just predictions, depending on how well your scRNAseq data covers the celltypes that are present in the ST data and on how parameters, gene selection etc. are tuned you may get different results.

Discuss

Subset for another region that does not contain cortex cells and check what you get from the label transfer. Suggested region is the right end of the posterial section that you can select like this:

# subset for the anterior dataset
subregion <- subset(brain.integrated, subset = orig.ident == "posterior1")

# there seems to be an error in the subsetting, so the posterior1 image is not removed, do it manually
subregion@images$anterior1 <- NULL

# add coordinates to metadata
# note that this only returns one slide by default
subregion$imagerow <- GetTissueCoordinates(subregion)$imagerow
subregion$imagecol <- GetTissueCoordinates(subregion)$imagecol

# subset for a specific region
subregion <- subset(subregion, subset = imagecol > 400, invert = FALSE)

p1 <- SpatialDimPlot(subregion, crop = TRUE, label = TRUE)
p2 <- SpatialDimPlot(subregion, crop = FALSE, label = TRUE, pt.size.factor = 1, label.size = 3)
p1 + p2

7 Session info

Click here
sessionInfo()
R version 4.3.0 (2023-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Etc/UTC
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] Biobase_2.62.0            BiocGenerics_0.48.1      
 [3] SCDC_0.0.0.9000           patchwork_1.1.2          
 [5] ggplot2_3.4.2             SeuratObject_4.1.3       
 [7] Seurat_4.3.0              stxBrain.SeuratData_0.1.1
 [9] SeuratData_0.2.2          dplyr_1.1.2              
[11] Matrix_1.5-4             

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3      rstudioapi_0.14         jsonlite_1.8.5         
  [4] magrittr_2.0.3          spatstat.utils_3.0-3    farver_2.1.1           
  [7] rmarkdown_2.22          zlibbioc_1.48.0         vctrs_0.6.2            
 [10] ROCR_1.0-11             memoise_2.0.1           spatstat.explore_3.2-1 
 [13] RCurl_1.98-1.12         htmltools_0.5.5         xbioc_0.1.19           
 [16] sctransform_0.3.5       parallelly_1.36.0       KernSmooth_2.23-20     
 [19] htmlwidgets_1.6.2       ica_1.0-3               plyr_1.8.8             
 [22] cachem_1.0.8            plotly_4.10.2           zoo_1.8-12             
 [25] igraph_1.4.3            mime_0.12               lifecycle_1.0.3        
 [28] pkgconfig_2.0.3         R6_2.5.1                fastmap_1.1.1          
 [31] GenomeInfoDbData_1.2.11 fitdistrplus_1.1-11     future_1.32.0          
 [34] shiny_1.7.4             digest_0.6.31           colorspace_2.1-0       
 [37] S4Vectors_0.40.2        AnnotationDbi_1.64.1    tensor_1.5             
 [40] irlba_2.3.5.1           RSQLite_2.3.1           labeling_0.4.2         
 [43] progressr_0.13.0        fansi_1.0.4             spatstat.sparse_3.0-1  
 [46] nnls_1.4                httr_1.4.6              polyclip_1.10-4        
 [49] abind_1.4-5             compiler_4.3.0          bit64_4.0.5            
 [52] withr_2.5.0             backports_1.4.1         DBI_1.1.3              
 [55] pkgmaker_0.32.8         MASS_7.3-58.4           rappdirs_0.3.3         
 [58] tools_4.3.0             lmtest_0.9-40           httpuv_1.6.11          
 [61] future.apply_1.11.0     goftest_1.2-3           glue_1.6.2             
 [64] nlme_3.1-162            promises_1.2.0.1        grid_4.3.0             
 [67] checkmate_2.2.0         Rtsne_0.16              cluster_2.1.4          
 [70] reshape2_1.4.4          generics_0.1.3          gtable_0.3.3           
 [73] spatstat.data_3.0-1     tidyr_1.3.0             data.table_1.14.8      
 [76] XVector_0.42.0          sp_1.6-1                utf8_1.2.3             
 [79] spatstat.geom_3.2-1     RcppAnnoy_0.0.20        ggrepel_0.9.3          
 [82] RANN_2.6.1              pillar_1.9.0            stringr_1.5.0          
 [85] later_1.3.1             splines_4.3.0           lattice_0.21-8         
 [88] bit_4.0.5               survival_3.5-5          deldir_1.0-9           
 [91] tidyselect_1.2.0        registry_0.5-1          Biostrings_2.70.2      
 [94] miniUI_0.1.1.1          pbapply_1.7-0           knitr_1.43             
 [97] gridExtra_2.3           IRanges_2.36.0          scattermore_1.2        
[100] stats4_4.3.0            xfun_0.39               matrixStats_1.0.0      
[103] pheatmap_1.0.12         stringi_1.7.12          lazyeval_0.2.2         
[106] yaml_2.3.7              evaluate_0.21           codetools_0.2-19       
[109] tibble_3.2.1            BiocManager_1.30.21     cli_3.6.1              
[112] uwot_0.1.14             xtable_1.8-4            reticulate_1.30        
[115] munsell_0.5.0           GenomeInfoDb_1.38.5     Rcpp_1.0.10            
[118] globals_0.16.2          spatstat.random_3.1-5   L1pack_0.41-24         
[121] png_0.1-8               parallel_4.3.0          ellipsis_0.3.2         
[124] assertthat_0.2.1        blob_1.2.4              fastmatrix_0.5         
[127] bitops_1.0-7            listenv_0.9.0           viridisLite_0.4.2      
[130] scales_1.2.1            ggridges_0.5.4          leiden_0.4.3           
[133] purrr_1.0.1             crayon_1.5.2            rlang_1.1.1            
[136] KEGGREST_1.42.0         cowplot_1.1.1