作者,追風少年i
周四了,一周最好的時光,不知道大家感覺怎么樣了?2022年上半年的最后一天,時光總是匆匆,不會為自己停留片刻。白哥有一句臺詞,之前做的再好也回不去了,項目交出去的那一刻,便不再屬于自己,那如果新的項目做不成,就該考慮換個工作了~~~~你再有輝煌也都是過去的事情了,要是因為過去的事出不來的話,我們就會越來越平庸。
半年了,我們要做總結,希望大家都能在自己擅長的領域有所成就~~~
七種方法的整合
show_methods()
#> [1] "connectome" "logfc" "natmi" "sca"
#> [5] "cellphonedb" "cytotalk" "call_squidpy" "call_cellchat"
#> [9] "call_connectome" "call_sca" "call_italk" "call_natmi"
其中重點涉及
10X單細胞之細胞通訊篇章-----Connectome
10X單細胞(10X空間轉錄組)通訊分析之CellChat
考慮空間位置的通訊分析手段---CellphoneDB(V3.0)
10X單細胞(10X空間轉錄組)通訊分析之CytoTalk(從頭構建信號轉導網絡 )
10X單細胞空間聯合分析回顧之squidpy
10X單細胞(10X空間轉錄組)細胞通訊的一個小小的細節
單細胞數據細胞通訊分析軟件NATMI
10X單細胞(10X空間轉錄組)通訊分析之NicheNet
數據庫包括
# Resource currently included in OmniPathR (and hence `liana`) include:
show_resources()
#> [1] "Default" "Consensus" "Baccin2019" "CellCall"
#> [5] "CellChatDB" "Cellinker" "CellPhoneDB" "CellTalkDB"
#> [9] "connectomeDB2020" "EMBRACE" "Guide2Pharma" "HPMR"
#> [13] "ICELLNET" "iTALK" "Kirouac2010" "LRdb"
#> [17] "Ramilowski2015" "OmniPath"
當然,我們要進一步擴充,首先來看LIANA與NicheNet的聯合分析
LIANA(LIgand-receptor AAnalysis frAmework)是一個框架,能夠使用不同的資源和方法對來自單細胞轉錄組學的配體-受體相互作用進行優先排序。 它允許用戶系統地生成關于來自給定細胞類型的哪些配體與另一種細胞類型的受體結合的假設。 與 LIANA 相比,NicheNet 旨在深化將配體與一組轉錄靶標連接起來的細胞內機制,從而廣泛使用來自多個來源的先驗知識。 LIANA 和 NicheNet 并不相互排斥,但在某些情況下可能相當互補,因為它們旨在探索細胞間和細胞內通信的不同方面。
其中Nichenet的參考鏈接在NicheNet,值得大家深入學習。
library(tidyverse)
library(liana)
library(nichenetr)
library(Seurat)
library(ggrepel)
library(cowplot)
options(timeout=300)
加載數據
# single-cell expression matrix described in Puram et al. 2017
hnscc_expression <- readRDS(url("https://zenodo.org/record/3260758/files/hnscc_expression.rds"))
# model weights
ligand_target_matrix <- readRDS(url("https://zenodo.org/record/3260758/files/ligand_target_matrix.rds"))
感興趣的細胞進行下游分析
expression <- hnscc_expression$expression
sample_info <- hnscc_expression$sample_info
colnames(sample_info) <- make.names(colnames(sample_info))
# filter samples based on vignette's information and add cell type
tumors_remove <- c("HN10", "HN", "HN12", "HN13", "HN24", "HN7", "HN8", "HN23")
sample_info <- sample_info %>%
subset( !(tumor %in% tumors_remove) & Lymph.node == 0) %>%
# fix some cell type identity names
mutate(cell_type = ifelse(classified..as.cancer.cell == 1, "Tumor", non.cancer.cell.type)) %>%
subset(cell_type %in% c("Tumor", "CAF"))
# cell ID as rownames
rownames(sample_info) <- sample_info$cell
# subset expression to selected cells
expression <- expression[sample_info$cell, ]
# gene set of interest
geneset_oi <- read_tsv(url("https://zenodo.org/record/3260758/files/pemt_signature.txt"), col_types = cols(), col_names = "gene") %>%
pull(gene) %>%
.[. %in% rownames(ligand_target_matrix)]
Run LIANA
# create seurat object
seurat_object <- Seurat::CreateAssayObject(counts = expm1(t(expression))) %>%
Seurat::CreateSeuratObject(., meta.data = sample_info) %>%
Seurat::NormalizeData()
# set cell identity to cell type
Idents(seurat_object) <- seurat_object@meta.data$cell_type
liana_results <- liana_wrap(seurat_object) %>%
liana_aggregate()
By default, LIANA will score the ligand-receptor interactions in all the possible directions within the two cell types of interest. This includes: Autocrine signaling (e.g. CAFs -> CAFs), CAFs -> Tumor cells and Tumor cells -> CAFs. As we are only interested in the CAFs -> Tumor cell direction, we filter the results and visualize the top 50 interactions according to the consensus/aggregate rank across methods. The aggregate rank itself can be interpreted as the significance of preferential enrichment for the interactions.
# filter results to cell types of interest
caf_tumor_results <- liana_results %>%
subset(source == "CAF" & target == "Tumor") %>%
dplyr::rename(ligand=ligand.complex, receptor=receptor.complex)
# filter results to top N interactions
n <- 50
top_n_caf_tumor <- caf_tumor_results %>%
arrange(aggregate_rank) %>%
slice_head(n = n) %>%
mutate(id = fct_inorder(paste0(ligand, " -> ", receptor)))
# visualize median rank
top_n_caf_tumor %>%
ggplot(aes(y = aggregate_rank, x = id)) +
geom_bar(stat = "identity") +
xlab("Interaction") + ylab("LIANA's aggregate rank") +
theme_cowplot() +
theme(axis.text.x = element_text(size = 8, angle = 60, hjust = 1, vjust = 1))
Run NicheNet using LIANA’s ligands
將 LIANA 與 NicheNet 結合的關鍵方面是可以使用 LIANA 優先考慮的配體作為 NicheNet 的潛在配體集。 不會評估受體也在受體細胞類型中表達的所有表達配體,我們將僅探索那些被 LIANA 中包含的方法優先考慮的配體。 因此,選擇形成前面所示相互作用的配體。
# get ligands and filter to those included in NicheNet's ligand-target matrix
ligands <- unique(top_n_caf_tumor$ligand)
ligands <- ligands[ligands %in% colnames(ligand_target_matrix)]
background_genes <- expression[sample_info$cell[sample_info$cell_type == "Tumor"], ] %>%
apply(2,function(x){10*(2**x - 1)}) %>%
apply(2,function(x){log2(mean(x) + 1)}) %>%
.[. >= 4] %>%
names()
并使用前面提到的 pEMT 基因集執行 NicheNet 預測配體活動
nichenet_activities <- predict_ligand_activities(
geneset = geneset_oi,
background_expressed_genes = background_genes,
ligand_target_matrix = ligand_target_matrix, potential_ligands = ligands
)
可視化
# prepare data for visualization
vis_liana_nichenet <- top_n_caf_tumor %>%
inner_join(nichenet_activities, by = c("ligand" = "test_ligand")) %>%
arrange(pearson) %>%
mutate(ligand = fct_inorder(ligand))
# prepare NicheNet figure
nichenet_scores_plot <- vis_liana_nichenet %>%
group_by(ligand) %>%
summarize(pearson = mean(pearson)) %>%
ggplot(aes(y = ligand, x = pearson)) +
geom_bar(stat = "identity") +
ggtitle("NicheNet") +
xlab("Pearson's score") +
theme_cowplot() +
theme(axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
axis.title.y = element_blank(),
axis.line.y = element_line(color = "white"),
plot.title = element_text(hjust = 0.5),
axis.text.x = element_text(angle = 60, hjust = 1, vjust = 1))
# prepare LIANA figure
liana_receptor_heatmap <- vis_liana_nichenet %>%
ggplot(aes(y = ligand, x = receptor, fill = aggregate_rank)) +
geom_tile() +
theme_cowplot() +
ggtitle("LIANA") +
ylab("Ligand") + xlab("Receptor") +
theme(axis.text.x = element_text(angle = 60, hjust = 1, vjust = 1),
plot.title = element_text(hjust = 0.5),
panel.grid.major = element_line(colour = "gray", linetype = 2),
legend.position = "left")
# combine plots
plot_grid(liana_receptor_heatmap, nichenet_scores_plot,
align = "h", nrow = 1, rel_widths = c(0.8,0.3))
其實,做單細胞通訊的軟件非常多,我都放在下面,供大家參考,包括空間轉錄組做通訊的分析方法
10X空間轉錄組之構建鄰域通訊網絡
10X空間轉錄組之組織區域臨近通訊實現方法
10X單細胞(10X空間轉錄組)細胞通訊分析之InterCellDB(推斷通訊中感興趣的生物學功能)
10X單細胞(10X空間轉錄組)數據分析之基于代謝物介導的細胞間通訊
10X空間轉錄組之空間臨近通訊分析stlearn進階版
10X單細胞(10X空間轉錄組)之單細胞精度分析細胞通訊
10X單細胞(10X空間轉錄組)通訊分析之匯總(scSeqComm)
10X空間轉錄組----空間臨近通訊的實現方法
10X空間轉錄組數據分析之空間臨近通訊網絡(DAGBagST)
10X空間轉錄組之再談距離分析和空間臨近通訊
10X空間轉錄組的位點注釋和臨近通訊
10X單細胞(10X空間轉錄組)之配受體聯合TF因子的通訊分析(cellcall)
10X單細胞(10X空間轉錄組)利用軌跡分析推斷細胞間的實時通訊(TraSig)
10X單細胞(10X空間轉錄組)細胞通訊之組間通訊差異分析(scDiffCom)
10X單細胞(10X空間轉錄組)多種通訊軟件聯合分析之liana
10X單細胞(10X空間轉錄組)之細胞通訊軟件之間的分析比較
10X單細胞(10X空間轉錄組)空間相關性分析和cellphoneDB與NicheNet聯合進行細胞通訊分析
10X空間轉錄組細胞通訊之stlearn(尋找區域交流熱點中心)
10X空間轉錄組(10X單細胞)之論細胞通訊空間分布的重要性
10X單細胞(10X空間轉錄組)通訊分析CellChat之多樣本通訊差異分析
10X單細胞通訊分析之scMLnet(配受體與TF,差異基因(靶基因)網絡通訊分析)
10X單細胞通訊分析之CrosstalkR(特異性和通訊強度的變化都很重要)
10X單細胞通訊分析之ICELLNET
10X空間轉錄組通訊分析章節3
空間通訊分析章節2
10X空間轉錄組做細胞通訊的打開方式
細胞通訊軟件RNAMagnet
好了,已經分享給大家了,生活很好,有你更好,百度文庫出現了大量抄襲我的文章,對此我深表無奈,我寫的文章,別人掛上去賺錢,抄襲可恥,掛到百度文庫的人更可恥