查看原文
其他

ProjecTILs系列教程(五):记忆性T细胞功能研究

The following article is from 生信宝库 Author Immugent

说在前面

CD4+ T细胞在启动和形成适应性免疫反应中发挥着核心作用,在病原体控制或清除后,绝大多数被激活的CD4 T细胞会发生凋亡,但有一部分细胞会长期存活,形成长寿记忆性细胞群。这些记忆细胞将能够在二次感染后,更快、更有效地做出反应。事实上,向特定的CD4+ T细胞亚群分化取决于几个因素,例如组织、抗原和周围环境中发现的细胞因子。其中一个亚群,滤泡辅助T细胞(Tfh),位于次级淋巴器官,并通过直接与B细胞接触促进抗体反应。

下面,Immugent将通过实操展示使用ProjecTILs自动化重新分析NICD处理的细胞,在第35天的单细胞数据(与同一时间点的对照样本相比)。为此,小编将在病毒感染中CD4+ T细胞参考图谱的背景下,应用投射来分析这些样本的数据。



代码实现

library(ggplot2)
library(reshape2)
library(patchwork)
library(ProjecTILs)

library(GEOquery)
geo_acc <- "GSE134157"
datadir <- "input/Kunzli"

gse <- getGEO(geo_acc)

system(paste0("mkdir -p ", datadir))
getGEOSuppFiles(geo_acc, baseDir = datadir)

exp_mat.1 <- read.table(sprintf("%s/GSE134157/GSE134157_UMImatrix_NICD_protector.tsv.gz",
    datadir))
exp_mat.2 <- read.table(sprintf("%s/GSE134157/GSE134157_UMImatrix_no_NICD_protector.tsv.gz",
    datadir))
    
dataUrl <- "https://drive.switch.ch/index.php/s/iJKbWGHwOhY1Llu/download"
fname <- sprintf("%s/mart_conversion_Mm.txt", datadir)

download.file(dataUrl, fname)

table <- read.csv(fname, sep = "\t")

ID2name <- table$Gene.name
names(ID2name) <- table$Gene.stable.ID
ID2name <- ID2name[!duplicated(names(ID2name))]

# Convert rownames in gene matrices
exp_mat.1 <- exp_mat.1[rownames(exp_mat.1) %in% names(ID2name), ]
rownames(exp_mat.1) <- ID2name[rownames(exp_mat.1)]

exp_mat.2 <- exp_mat.2[rownames(exp_mat.2) %in% names(ID2name), ]
rownames(exp_mat.2) <- ID2name[rownames(exp_mat.2)]

query.list <- list()

query.list[["protector"]] <- CreateSeuratObject(counts = exp_mat.1, min.cells = 3,
    min.features = 50)
query.list[["protector"]]$Sample <- substring(colnames(query.list[["protector"]]),
    18)
query.list[["protector"]]$condition <- "protector"

query.list[["control"]] <- CreateSeuratObject(counts = exp_mat.2, min.cells = 3,
    min.features = 50)
query.list[["control"]]$Sample <- substring(colnames(query.list[["control"]]), 18)
query.list[["control"]]$condition <- "control"

query.merged <- merge(query.list[[1]], query.list[[2]])

# Downsample to 1000 cells per sample
set.seed(1234)
Idents(query.merged) <- "Sample"
query.merged <- subset(query.merged, cells = WhichCells(query.merged, downsample = 1000))
table(query.merged$Sample)
# Download the reference atlas
cd4.atlas.file <- "ref_LCMV_CD4_mouse_release_v1.rds"
if (!file.exists(cd4.atlas.file)) {
    dataUrl <- "https://figshare.com/ndownloader/files/31057081"
    download.file(dataUrl, cd4.atlas.file)
}
ref <- load.reference.map(cd4.atlas.file)

DimPlot(ref, label = T, cols = ref@misc$atlas.palette)
query.by.sample <- SplitObject(query.merged, split.by = "Sample")

query.projected <- make.projection(query.by.sample, ref = ref)

plots <- list()
palette <- ref@misc$atlas.palette

for (i in seq_along(query.projected)) {
    sample <- names(query.projected)[i]
    cond <- unique(query.projected[[i]]$condition)

    query.projected[[i]] <- cellstate.predict(ref = ref, query = query.projected[[i]],
        reduction = "umap", ndim = 2)

    plots[[i]] <- plot.projection(ref, query.projected[[i]], linesize = 0.5, pointsize = 0.5,
        cols = palette) + ggtitle(paste(sample, cond)) + NoLegend() + theme(legend.position = "none",
        panel.grid = element_blank(), axis.title = element_blank(), axis.text = element_blank(),
        axis.ticks = element_blank())

    plots[[i + 3]] <- plot.statepred.composition(ref, query = query.projected[[i]],
        cols = palette, metric = "Percent") + ggtitle(" ") + ylim(0, 50) + theme_bw() +
        theme(panel.grid = element_blank(), axis.text.x = element_blank(), axis.ticks.x = element_blank())
}

g <- wrap_plots(plots, ncol = 3)
plot(g)
features <- c("Ifng""Ccl5""Gzmb""Cxcr6""Selplg""Id2""Tbx21""Ly6c2",
    "Cxcr5""Tox""Tox2""Izumo1r""Pdcd1""Tnfsf8""Ccr7""Il7r""Tcf7",
    "Eomes""Ifit1")

p <- plot.states.radar(ref, query = query.projected, min.cells = 30, genes4radar = features)
query.bycondition <- list()

query.bycondition[["Control"]] <- query.projected$Spleen_0
query.bycondition[["Protector"]] <- ProjecTILs:::merge.Seurat.embeddings(query.projected$Spleen_1,
    query.projected$Spleen_2)
    
plots <- list()

for (i in seq_along(query.bycondition)) {
    cond <- names(query.bycondition)[i]

    plots[[i]] <- plot.projection(ref, query.bycondition[[i]], linesize = 0.5, pointsize = 0.5,
        cols = palette) + ggtitle(cond) + NoLegend()

    query.bycondition[[i]] <- cellstate.predict(ref = ref, query = query.bycondition[[i]],
        reduction = "umap", ndim = 2)

    plots[[i + 2]] <- plot.statepred.composition(ref, query = query.bycondition[[i]],
        cols = palette, metric = "Percent") + ggtitle(" ") + ylim(0, 50) + theme_bw() +
        theme(panel.grid = element_blank(), axis.text.x = element_blank(), axis.ticks.x = element_blank())
}

g <- wrap_plots(plots, ncol = 2)
g

小结

长寿型的Tfh细胞一直以来都是难以检测的,以至于其表征目前还不清楚。Kunzli等人(2020)的研究中发现,在样品分离过程中,Tfh细胞特别容易受到NADH诱导的细胞死亡(NICD)的影响,并建议使用阻断NICD的抑制剂来丰富感染后的Tfh细胞群。

通过上面的分析结果我们可以发现,与原文一致的是在将CD4+ T细胞scRNA-seq数据映射到参考图谱中后,与对照组相比,NICD-protector治疗后Tfh记忆性细胞显著富集;重要的是,ProjecTILs在几分钟内就能完成对异质性较高的单细胞数据的分析,而这个过程不需要特定的T细胞生物学专业知识就能完成。

好啦,截止到这,实操部分的5篇推文就全部完成,后面还会有一期对ProjecTILs在实际应用中的使用进行解读,敬请期待!



关注下方公众号下回更新不迷路

您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存