Closed ixxmu closed 5 months ago
❝Immune Response Enrichment Analysis (IREA) is the companion software for the Immune Dictionary.
IREA assesses cytokine activities, immune cell polarization, and cell-cell communication from user transcriptomic data.
❞
「从(单细胞)转录组数据中评估细胞因子活性、免疫细胞极化和细胞间通讯。」
抗 PD-1 治疗后肿瘤微环境细胞相对于对照组治疗的 IREA 分析示例(基于 scRNA-seq 数据)
这是慢性病毒性肝炎治疗前后中性粒细胞亚群在干扰素影响下的极化趋势慢性病毒性肝炎(二)中性粒细胞亚群细分策略
我们如何能获得这样的作图数据呢?
当我们拿到了中性粒细胞的seurat数据后:
rm(list = ls())
source('scRNA_scripts/lib.R')
load("./check-by-celltype/after_harmony_neu.Rdata")
# 假设数据已加载到Seurat对象中
seurat_obj <- seuratObj # 替换为实际的Seurat对象
# 选择细胞类型和条件
Neu_idx <- WhichCells(seurat_obj, expression = celltype == "Neutrophil" & treatment %in% c("Pre", "Post"))
tmp <- subset(seurat_obj, cells = Neu_idx)
# 确保 `tmp` 对象中有 `treatment` 列并将其设置为身份列
Idents(tmp) <- tmp@meta.data$treatment
# 进行差异表达分析
de_results <- FindMarkers(tmp, ident.1 = "Pre", ident.2 = "Post", logfc.threshold = 0, min.pct = 0)
# 筛选差异表达基因
fde_r <- de_results %>% filter(p_val_adj < 0.05 & abs(avg_log2FC) > 0.05) # 根据实际数据调整筛选条件
# 加载polarization state数据框
# https://static-content.springer.com/esm/art%3A10.1038%2Fs41586-023-06816-9/MediaObjects/41586_2023_6816_MOESM9_ESM.xlsx
polardat <- read_xlsx("./S7.xlsx",sheet = "Neutrophil")
# ##鼠和人的基因转换
# # mouse and human homologue gene conversion was based on the National Center for Biotechnology Information HomoloGene database (release 68)
# # 加载biomaRt包
# library(biomaRt)
#
# # 连接到Ensembl数据库
# # 尝试使用不同的Ensembl镜像服务器
# ensembl <- useEnsembl(biomart = "genes",mirror = "www")
#
# # 选择小鼠基因数据集
# ensembl_mouse <- useDataset("mmusculus_gene_ensembl", mart = ensembl)
#
# # 选择人类基因数据集
# ensembl_human <- useDataset("hsapiens_gene_ensembl", mart = ensembl)
#
# # 示例小鼠基因列表
# mouse_genes <- polardat$Gene
#
# # 获取小鼠基因对应的人类基因
# mouse_to_human <- getLDS(attributes = c("mgi_symbol"),
# filters = "mgi_symbol",
# values = mouse_genes,
# mart = ensembl_mouse,
# attributesL = c("hgnc_symbol"),
# martL = ensembl_human)
#
#
# # 提取转换后的人类基因列表
# human_genes <- mouse_to_human$HGNC.symbol
##简单粗暴的方法
polardat$GENE <- toupper(polardat$Gene)
fde_r <- fde_r %>% mutate(polarization=polardat$Polarization[match(rownames(.),polardat$GENE)]) %>%
mutate(polarscore=polardat$Pct_polarstate[match(rownames(.),polardat$GENE)]) %>%
na.omit()
##
radat <- fde_r %>% dplyr::select(,c("polarization","polarscore")) %>%
mutate(gene=rownames(.))
##后续挑出干扰素相关基因作图
https://mp.weixin.qq.com/s/pD3dKVYbDJjv4_W0Xtzy8w