5  Spatial Transcriptomics (ST)

5.1 Spatial transcriptomics

The sequencing sequences were aligned to the corresponding reference genome (GRCh38 for human samples and GRCm38 for mouse samples) by SpaceRanger (v3.0, 10x Genomics). Additional preprocessing steps, including UMI counting and spot barcode filtering, were performed using SpaceRanger. The resulting ‘.cloupe’ files and ‘filtered_feature_bc_matrix’ directories were used for subsequent analyses.

The clean data generated by SpaceRanger were used for analyzing. Seurat (v5.0.1) was used to generate analysis object within the R environment (v4.3.0, https://cran.r-project.org). SCT (v2) algorithm was used to normalization, scaling, and the identification of highly variable features PCA embedding was performed using “RunPCA”, with number of principal components (PCs) setting as 100. Top 30 PCs were then utilized for non-linear process of UMAP. Samples from different stages were merged to analyze gene expression similarities across developmental stages using the same processing pipeline. Tissue-unique features were calculated with ‘FindAllMarkers’ function along with the manual annotations.

library(Seurat)
library(glue)
library(tidyverse)

seu_lst <- lapply(c("E9.5", "E11.5", "E13.5"), function(stg) {
  dir <- glue("data/{stg}")
  seu <- Seurat::Load10X_Spatial(data.dir = dir)
  csv_fn <- glue("data/{stg}_tissuetype.csv")
  tissuetype <- read_csv(csv_fn)
  seu$stage <- stg
  seu$tissuetype <- tissuetype$tissuetype
  seu <- seu |> Seurat::SCTransform() |> Seurat::RunPCA(npcs = 100) |> 
  Seurat::RunUMAP(dims = 1:30) 
  Idents(seu) <- seu$tissuetype
  mks <- Seurat::FindAllMarkers(seu, logfc.threshold = 0)
  write_csv(mks, glue("{stg}_tissuetypes_mks.csv"))
  return(seu)
}) |> setNames(nm = c("E9.5", "E11.5", "E13.5"))

mrg_seu <- merge(seu_lst[[1]], seu_lst[-1])
mrg_seu2 <- mrg_seu |> Seurat::SCTransform() |> Seurat::RunPCA(npcs = 100) |> 
  Seurat::RunUMAP(dims = 1:30)