4G. Score cell populations for specific gene signatures

Evaluate endothelial cell markers

  • Related to Supplemental Figure 4.
  • general kidney endothelial cell markers: Emcn, Kdr, Vwf, Ace, Cd34, Selp, Flt1
  • glomerular endothelial cell markers: Ehd3, Plvap, Serpine2, Igfbp5, Cyp4b1, Tspan7
DefaultAssay(trj_object) <- "RNA"
trj_object$cell_type_manual <- factor(trj_object$cell_type_manual, levels =
    c("SMC", "tSMC_1", "tSMC_2", "MC", "JG", "glomEnC", "EnC", "fEnC", "arterialEnC"))
enc_markers <- c("Cdh5", "Pecam1", "Emcn", "Kdr", "Vwf", "Ace", "Cd34", "Selp", "Flt1",
                 "Ehd3", "Plvap", "Serpine2", "Igfbp5", "Cyp4b1", "Tspan7")
trj_object <- AddModuleScore_UCell(trj_object, features=list(EnC=enc_markers))
vln_plt <- VlnPlot_scCustom(trj_object, features = "EnC_UCell", alpha=0.25,
                       group.by = "cell_type_manual", split.by = "condition",
                       pt.size = 0.1, color_seed = 99,
                       split.plot=TRUE) +
          ggtitle("Endothelial Cell Signature") +
          theme(plot.title = element_text(size = 15/.pt),
                axis.text.x = element_text(size = 12/.pt, angle = 90,
                                           hjust = 1, vjust = 0.5),
                axis.text.y = element_text(size = 12/.pt),
                axis.title.y = element_text(size = 15/.pt)) +
          labs(x="", y="Module Enrichment Score (normalized U Statistic)")
ft_plt <- FeaturePlot_scCustom(trj_object, features = "EnC_UCell",
                               reduction = "umap.trj_subset.cca",
                               label.size=1, order = T,
                               label = TRUE, repel = TRUE) &
              custom_theme() &
              theme(text = element_text(size = 12/.pt),
                    plot.title = element_text(size = 15/.pt),
                    axis.text.x = element_text(size = 12/.pt),
                    axis.text.y = element_text(size = 12/.pt),
                    axis.title.x = element_text(size = 15/.pt),
                    axis.title.y = element_text(size = 15/.pt))
ggsave(paste0("figures/captopril-multiome_trj-object_EndothelialCellSignature_", Sys.Date(), ".png"),
       plot = ft_plt | vln_plt, width=360, height=180, units = "mm", dpi = 600)
ggsave(paste0("figures/captopril-multiome_trj-object_EndothelialCellSignature_", Sys.Date(), ".svg"),
       plot = ft_plt | vln_plt, width=360, height=180, units = "mm", dpi = 300)

Create function to score gene signatures repeatedly/easily

scoreGeneList <- function(object = renin_seurat, gene_list, name="CAAH", outdir="figures/CAAH/") {
    object <- AddModuleScore_UCell(object, features=list(Signature=gene_list))
    scores_dt <- as.data.table(object@meta.data, keep.rownames=T)[, c("rn", "condition", "cell_type_manual", "Signature_UCell")]
    trt_score  <- mean(scores_dt[condition == "trt",]$Signature_UCell)
    ctrl_score <- mean(scores_dt[condition == "ctrl",]$Signature_UCell)
    score_diff <- trt_score - ctrl_score

    idents_plt <- VlnPlot_scCustom(object, features = "Signature_UCell",
                       alpha=0.1, split.by="condition",
                       group.by = "cell_type_manual",
                       pt.size = 0, color_seed = 99) +
          custom_theme() +
          ggforce::geom_sina(seed=99, binwidth=100, adjust=4) +
          theme(plot.title = element_text(size = 15/.pt),
                axis.text.x = element_text(size = 12/.pt, angle = 90,
                                           hjust = 1, vjust = 0.5),
                axis.text.y = element_text(size = 12/.pt),
                axis.title.y = element_text(size = 15/.pt)) +
          labs(x="", y=paste0(name, " Enrichment Score (normalized U Statistic)"))
    idents_plt <- idents_plt + labs(
              caption = paste0("TRT ", name, " Score: ", round(trt_score, 3), "\n",
                               "CTRL ", name, " Score: ", round(ctrl_score, 3), "\n",
                               "Difference: ", round(score_diff, 3)))
    ggsave(paste0(outdir, sample_name, "_renin-lineage-only_", name, "_", Sys.Date(), ".png"),
       plot = idents_plt, width = 90, height = 90, units = "mm", dpi = 300,
       create.dir=TRUE)
    ggsave(paste0(outdir, sample_name, "_renin-lineage-only_", name, "_", Sys.Date(), ".svg"),
       plot = idents_plt, width = 90, height = 90, units = "mm", dpi = 300,
       create.dir=TRUE)

    condition_plt <- VlnPlot_scCustom(object, features = "CAAH_UCell",
                       alpha=0.1,
                       group.by = "condition",
                       pt.size = 0, color_seed = 99) +
          custom_theme() +
          ggforce::geom_sina(seed=99, binwidth=100, adjust=4) +
          theme(plot.title = element_text(size = 15/.pt),
                axis.text.x = element_text(size = 12/.pt, angle = 90,
                                           hjust = 1, vjust = 0.5),
                axis.text.y = element_text(size = 12/.pt),
                axis.title.y = element_text(size = 15/.pt)) +
          labs(x="", y="Module Enrichment Score (normalized U Statistic)")
    condition_plt <- condition_plt + labs(
              caption = paste0("TRT ", name, " Score: ", round(trt_score, 3), "\n",
                               "CTRL ", name, " Score: ", round(ctrl_score, 3), "\n",
                               "Difference: ", round(score_diff, 3)))
    ggsave(paste0(outdir, sample_name, "_renin-lineage-only_condition-split_", name, "_", Sys.Date(), ".png"),
       plot = condition_plt, width = 90, height = 90, units = "mm", dpi = 300,
       create.dir=TRUE)
    ggsave(paste0(outdir, sample_name, "_renin-lineage-only_condition-split_", name, "_", Sys.Date(), ".svg"),
       plot = condition_plt, width = 90, height = 90, units = "mm", dpi = 300,
       create.dir=TRUE)

    cpm_obj <- NormalizeData(object, method = "RC", scale.factor = 1e6)
    data_mat <- as.matrix(SeuratObject::LayerData(cpm_obj, assay = "RNA", layer = "counts"))
    scores <- ScoreSignatures_UCell(data_mat, features=list(Signature=gene_list))
    melted <- reshape2::melt(scores)
    colnames(melted) <- c("Cell", "Signature", "UCell_score")
    melted_dt <- as.data.table(melted)
    renin_metadata <- as.data.table(object@meta.data, keep.rownames=T)
    melted2 <- merge(melted_dt, renin_metadata, by.x="Cell", by.y="rn")
    signature.lm <- lm(UCell_score ~ cell_type_manual * condition, data=melted2)
    signature.pw <- pairs(emmeans(signature.lm, ~ condition | cell_type_manual))
    signature_pvals <- as.data.table(test(signature.pw, by = NULL, adjust = "BH"))
    fwrite(signature_pvals,
        paste0("figures/", name, "/", name,
               "_renin-lineage-only_EMMs_BHadjusted_pvalues.csv"),
        sep=",")

    # Score all trajectory populations
    subset_obj <- AddModuleScore_UCell(subset_obj, features=list(Signature=gene_list))
    condition_plt <- VlnPlot_scCustom(subset_obj, features = "Signature_UCell", alpha=0.25,
                           group.by = "condition", 
                           pt.size = 0.1, color_seed = 99) +
              custom_theme() +
              theme(plot.title = element_text(size = 15/.pt),
                    axis.text.x = element_text(size = 12/.pt, angle = 90,
                                               hjust = 1, vjust = 0.5),
                    axis.text.y = element_text(size = 12/.pt),
                    axis.title.y = element_text(size = 15/.pt)) +
              labs(x="", y=paste0(name, " Enrichment Score (normalized U Statistic)"))
    ggsave(paste0("figures/", name, "/", sample_name,
                  "_trajectory-others_", name, "-markers_", Sys.Date(), ".png"),
           plot = condition_plt, width = 90, height = 90, units = "mm", dpi = 300)
    ggsave(paste0("figures/", name, "/", sample_name,
                  "_trajectory-others_", name, "-markers_", Sys.Date(), ".svg"),
           plot = condition_plt, width = 90, height = 90, units = "mm", dpi = 300)

    # Same plot but on individual cell populations
    Idents(subset_obj) <- subset_obj$cell_type_manual
    subset_obj$cell_type_manual <- factor(subset_obj$cell_type_manual, levels=
        c("MC", "glomEnC", "arterialEnC", "fEnC", "EnC"))
    idents_plt <- VlnPlot_scCustom(subset_obj, features = "Signature_UCell", alpha=0.1,
                           group.by = "cell_type_manual", split.by="condition",
                           pt.size = 0, color_seed = 99) +
              custom_theme() +
              ggforce::geom_sina(seed=99, binwidth=100, adjust=4) +
              theme(plot.title = element_text(size = 15/.pt),
                    axis.text.x = element_text(size = 12/.pt, angle = 90,
                                               hjust = 1, vjust = 0.5),
                    axis.text.y = element_text(size = 12/.pt),
                    axis.title.y = element_text(size = 15/.pt)) +
              labs(x="", y=paste0(name, " Enrichment Score (normalized U Statistic)"))
    ggsave(paste0("figures/" name, "/", sample_name,
                  "_trajectory-others_cell-type_", name, "-markers_",
                  Sys.Date(), ".png"),
           plot = idents_plt, width = 90, height = 90, units = "mm", dpi = 300)
    ggsave(paste0("figures/" name, "/", sample_name,
                  "_trajectory-others_cell-type_", name, "-markers_",
                  Sys.Date(), ".svg"),
           plot = idents_plt, width = 90, height = 90, units = "mm", dpi = 300)

    cpm_obj <- NormalizeData(subset_obj, method = "RC", scale.factor = 1e6)
    data_mat <- as.matrix(SeuratObject::LayerData(cpm_obj, assay = "RNA", layer = "counts"))
    scores <- ScoreSignatures_UCell(data_mat, features=list(Signature=gene_list))
    melted <- reshape2::melt(scores)
    colnames(melted) <- c("Cell", "Signature", "UCell_score")
    melted_dt <- as.data.table(melted)
    subset_metadata <- as.data.table(subset_obj@meta.data, keep.rownames=T)
    melted2 <- merge(melted_dt, subset_metadata, by.x="Cell", by.y="rn")
    signature.lm <- lm(UCell_score ~ cell_type_manual * condition, data=melted2)
    signature.pw <- pairs(emmeans(signature.lm, ~ condition | cell_type_manual))
    signature_pvals <- as.data.table(test(signature.pw, by = NULL, adjust = "BH"))
    fwrite(signature_pvals,
        paste0("figures/", name, "/", name,
               "_trajectory-others_EMMs_BHadjusted_pvalues.csv"),
        sep=",")
}

SASP gene signature

  • Related to Figure 3.
sasp_genes <- unique(c("Il6", "Il1a", "Il1b", "Il1r1", "Il1rn", "Il7",
    "Il7r", "Il13", "Il15",  "Cxcl1", "Cxcl2", "Cxcl3",
    "Ccl8", "Ccl20", "Ccl11", "Ccl25",
    "Ccl26", "Csf2", "Mif", "Fn1", "Areg", "Ereg", "Nrg1", "Fgf2",
    "Hgf", "Fgf7", "Vegfa", "Ang", "Pigf",
    "Mmp3", "Mmp10", "Mmp12", "Mmp13", "Mmp14", "Timp2",
    "Serpine1", "Ctsb", "Icam1", "Tnfrsf11b",
    "Fas", "Plaur", "Il6st", "Egfr", "Ptger2", "Nos1",
    "Cdkn1a", "Cdkn2a", "Lmnb1", "Bcl2l1", "Bcl2l2",
    "Serpinb2", "Hsp90aa1", "Hsp90ab1", "Igf1", "Igf1r", "Igf2",
    "Igfbp1", "Igfbp2", "Igfbp3", "Igfbp4", "Igfbp5",
    "Igfbp6", "Igfbp7"))

renin_seurat <- renin_obj@data
scoreGeneList(object = renin_seurat,
    gene_list = sasp_genes,
    name = "SASP",
    outdir = "figures/SASP/")

Inflammation gene signature

  • Related to Figure 3.
IFRG_genes <- unique(c("Tnfrsf1a", "Tnfrsf1b", "Tnfrsf21", "Tnfrsf19",
    "Il15ra", "Il17f", "Cd55", "Cd300c", "Tnfsf15", "Csf1", "Havcr2",
    "Il1r1", "Il18r1", "Il17a", "Lifr", "Cxcl1", "Ros1", "Plaur", "Acvr2a",
    "Klf6", "Gabbr1", "Aplnr", "Sphk1", "Pdpn", "Adora2b", "Ripk2", "Ptges",
    "Cxcl9", "Wnt7a", "Hrh1", "Tnfsf9", "Kl", "Ffar3", "Agt",
    "Mc1r", "Il17d"))

renin_seurat <- renin_obj@data
scoreGeneList(object = renin_seurat,
    gene_list = IFRG_genes,
    name = "IFRG",
    outdir = "figures/IFRG/")

Hypoxia gene signature

  • Related to Figure 3.
hypoxia_genes <- unique(c("Plaur", "Ucn", "Pabpc1l", "Slc16a12", "Nfe2l3",
    "Kcnab1", "Gpc3", "Kif5a", "Ankzf1", "Ets1", "Selenbp1", "Aldoa",
    "Angptl4", "Anln", "Bnc1", "Mrgbp", "Cdkn3", "Col4a6", "Dcbld1", "Eno1",
    "Fam83b", "Fosl1", "Gnai1", "Hilpda", "Kctd11", "Krt17", "Ldha", "P4ha1",
    "Pgam1", "Pgk1", "Sdc1", "Slc16a1", "Slc2a1", "Tpi1", "Vegfa", "Cygb",
    "Hif1a", "Arnt"))

renin_seurat <- renin_obj@data
scoreGeneList(object = renin_seurat,
    gene_list = hypoxia_genes,
    name = "Hypoxia",
    outdir = "figures/Hypoxia/")

Extracellular matrix protein (i.e. the matrisome) gene signature

  • Related to Figure 3.
matrisome <- fread('matrisome_gene_list_mouse.csv')
matrisome$`Category` <- stringr::str_replace_all(matrisome$`Category`, " ", "_")
matrisome$`Category` <- stringr::str_replace_all(matrisome$`Category`, "-", "_")
matrisome$`Division` <- stringr::str_replace_all(matrisome$`Division`, " ", "_")
matrisome$`Gene Symbol` <- stringr::str_replace(matrisome$`Gene Symbol`, "Ctgf", "Ccn2")
matrisome$`Gene Symbol` <- stringr::str_replace(matrisome$`Gene Symbol`, "Emilin3", "Mmrn2")
matrisome$`Gene Symbol` <- stringr::str_replace(matrisome$`Gene Symbol`, "Vwa9", "Ints14")
matrisome$`Gene Symbol` <- stringr::str_replace(matrisome$`Gene Symbol`, "Wisp2", "Ccn5")
matrisome$`Gene Symbol` <- stringr::str_replace(matrisome$`Gene Symbol`, "Lepre1", "P3h1")
matrisome$`Gene Symbol` <- stringr::str_replace(matrisome$`Gene Symbol`, "Leprel1", "P3h2")

ecm_genes <- list(ECM_Glycoproteins=matrisome[matrisome$Category == "ECM_Glycoproteins",]$`Gene Symbol`,
                  Collagens=matrisome[matrisome$Category == "Collagens",]$`Gene Symbol`,
                  ECM_Regulators=matrisome[matrisome$Category == "ECM_Regulators",]$`Gene Symbol`,
                  ECM_affiliated_Proteins=matrisome[matrisome$Category == "ECM_affiliated_Proteins",]$`Gene Symbol`,
                  Proteoglycans=matrisome[matrisome$Category == "Proteoglycans",]$`Gene Symbol`,
                  Secreted_Factors=matrisome[matrisome$Category == "Secreted_Factors",]$`Gene Symbol`)

renin_seurat <- renin_obj@data
scoreGeneList(object = renin_seurat,
    gene_list = ecm_genes,
    name = "ECM",
    outdir = "figures/ECM/")

Individual hypoxia and glycolytic gene expression

  • Related to Figure 3.

Produces manuscript Figure 3d (violin plots of key hypoxia-responsive and glycolytic genes in captopril-treated vs untreated renin-lineage cells).

key_genes       <- c("Hif1a", "Epas1", "Epo", "Epor", "Vegfa",
                     "Hk2", "Pfkm", "Pkm", "Ldha")
key_genes_avail <- key_genes[key_genes %in% rownames(renin_seurat)]

p_key <- VlnPlot(renin_seurat, features = key_genes_avail,
                 group.by = "condition", pt.size = 0, ncol = 5) &
    scale_fill_manual(values = c("trt" = "#D73027", "ctrl" = "#4575B4")) &
    theme_classic(base_size = 9) &
    theme(axis.title.x = element_blank(), legend.position = "none")

ggsave(paste0(outdir, sample_name, "_key-hypoxia-glycolytic-genes_violin_", Sys.Date(), ".svg"),
       p_key, width = 200, height = 80, units = "mm", dpi = 300)

Identify CAAH gene signature

  • Related to Figure 6.
protein_biomarkers <- c("Lamp2", "Obp1a", "Ahsg", "Wfdc2", "Sod3", "Spink1",
                        "Sod1", "Ly6d", "Cdh13", "Col12a1", "Grn", "Nid2",
                        "Col1a1", "Psap", "Gsg1l")
potential_signature <- unique(c(sasp_genes, IFRG_genes, hypoxia_genes,
                                ecm_genes, protein_biomarkers))
final_gene_list <- potential_signature
num_permutations <- 3500
starting_list <- c("Anxa5", "Col18a1", "Serpine1", "Fbn1", "Klf6", "P4ha1",
                   "Lama5", "Aldoa", "Adamts2", "Timp3", "Sparc")
renin_seurat <- AddModuleScore_UCell(renin_seurat, features=list(CAAH=starting_list))
CAAH_scores_dt <- as.data.table(renin_seurat@meta.data, keep.rownames=T)[, c("rn", "condition", "cell_type", "CAAH_UCell")]
trt_caah_score  <- mean(CAAH_scores_dt[condition == "trt",]$CAAH_UCell)
ctrl_caah_score <- mean(CAAH_scores_dt[condition == "ctrl",]$CAAH_UCell)
caah_score_diff <- trt_caah_score - ctrl_caah_score

for (i in 1:num_permutations) {
    message(paste0("round: ", i))
    sampled_gene_list <- base::sample(potential_signature, 10, replace=FALSE)
    caah_scores <- ScoreSignatures_UCell(data_mat,
        features=list(CAAH=sampled_gene_list),
        ncores=parallel::detectCores()/6)
    melted <- reshape2::melt(caah_scores)
    colnames(melted) <- c("Cell", "Signature", "UCell_score")
    melted_dt <- as.data.table(melted)
    melted2 <- merge(melted_dt, renin_metadata, by.x="Cell", by.y="rn")
    sampled_trt_caah_score <- mean(melted2[condition == "trt",]$UCell_score)
    sampled_ctrl_caah_score <- mean(melted2[condition == "ctrl",]$UCell_score)
    sampled_score_diff <- sampled_trt_caah_score - sampled_ctrl_caah_score
    if (sampled_score_diff > caah_score_diff) {
        message(paste0("gene_list_", i, " is better"))
        trt_caah_score  <- sampled_trt_caah_score
        ctrl_caah_score <- sampled_ctrl_caah_score
        caah_score_diff <- sampled_score_diff
        final_gene_list <- sampled_gene_list 
        dt <- data.table(gene_list = sampled_gene_list,
                         trt_score = sampled_trt_caah_score,
                         ctrl_score = sampled_ctrl_caah_score,
                         diff_score = caah_score_diff)
        write.csv(dt, paste0("caah_scores/gene_list_", i, ".csv"))
    }
}