hi 各位颜曾,今天周五了纠拔,要開會的關(guān)系,沒有那么多時間準(zhǔn)備分享文獻了泛豪,但是我很想和大家分享這個方法稠诲,類似于多組學(xué)分析侦鹏,配受體與TF分析聯(lián)合起來的網(wǎng)絡(luò)分析結(jié)果,非常有價值(配體臀叙,受體种柑,靶基因,TF多層網(wǎng)絡(luò)結(jié)構(gòu)匹耕,非常贊)聚请,我們今天就不分享文獻了,多關(guān)注一下代碼,文章在Inferring microenvironmental regulation of gene expression from single-cell RNA sequencing data using scMLnet with an application to COVID-19, 2020年底發(fā)表于Briefings in Bioinformatics稳其,影響因子9分驶赏。
Introduction
scMLnet是一個R軟件包,用于根據(jù)單細(xì)胞RNA-seq表達數(shù)據(jù)構(gòu)建細(xì)胞間/細(xì)胞內(nèi)多層信號交換網(wǎng)絡(luò)既鞠。 scMLnet通過基于細(xì)胞類型特異性基因表達煤傍,先驗網(wǎng)絡(luò)信息和統(tǒng)計推斷,整合細(xì)胞間途徑(配體-受體相互作用)和細(xì)胞內(nèi)子網(wǎng)絡(luò)(受體-TF途徑以及TF-靶基因相互作用)嘱蛋,構(gòu)建多層網(wǎng)絡(luò)蚯姆。 scMLnet還可以可視化中央細(xì)胞和鄰近細(xì)胞之間構(gòu)建的細(xì)胞間/細(xì)胞內(nèi)信號通路。
The main steps of the scMLnet algorithm include:
(1) Step1 Constructing Ligand-Receptor subnetwork:
通過獲取高度表達的基因(HEG)洒敏,從scRNA-Seq數(shù)據(jù)和配體受體數(shù)據(jù)庫定義潛在的配體受體子網(wǎng)龄恋。 類型A(發(fā)送者細(xì)胞)中的HEG被視為潛在的配體,類型B(受體細(xì)胞)中的HEG被視為潛在的受體凶伙。
(2) Step2 Constructing TF-Target gene subnetwork
通過獲取HEG和Fisher的精確檢驗(這個可以參考文章Fisher 精確檢驗與卡方檢驗(10X單細(xì)胞和10X空間轉(zhuǎn)錄組的基礎(chǔ)知識))郭毕,從scRNA-Seq數(shù)據(jù)和TF-Target基因數(shù)據(jù)庫中定義了有效的TF-Target基因子網(wǎng)絡(luò)。 B型HEG被認(rèn)為是潛在的靶基因函荣。 可以從TF-Target基因子網(wǎng)絡(luò)中推斷出激活的TF显押。
(3) Step3 Constructing Receptor-TF subnetwork
通過Fisher的精確測試從激活的TF和Receptor-TF數(shù)據(jù)庫中定義了有效的Receptor-TF子網(wǎng)。 激活的受體可以從TF-Target基因子網(wǎng)絡(luò)中推斷出來傻挂。
(4)Step4 constructing multi-layer signaling network
通過在受體與TF乘碑,TF和靶基因之間進行相關(guān)分析,然后根據(jù)共同的受體和TF重疊配體-受體金拒,TF-靶基因兽肤,受體-TF子網(wǎng)來定義多層信號網(wǎng)絡(luò)。 (相當(dāng)贊)殖蚕。
輸入和輸出
For this tutorial, we will be using scMLnet to construct the multi-layer signaling network between B cells and Secretory cells from scRNA-Seq data of BALF in COVID-19 patients. The expression matrix and annotation of clstuers can be found in the /example
folder (or be downloaded from Zenodo) and the prior information about interactions in the /database
folder.
library(Seurat)
library(Matrix)
library(parallel)
library(scMLnet)
加載包轿衔,Seurat包用于normalizing the raw scRNA-Seq data,the Matrix package is used for transformation between matrix and sparse matrix and the parallel package is used for parallel computation of t.test for screening(后面兩步好像Seurat本身就可以完成睦疫,Seurat依賴于后兩個包,所以有這個功能)鞭呕。
輸入的是We then read a raw scRNA-Seq data with rows as genes (gene symbols) and columns as cells and the gene expression matrix is required as a sparse matrix(原始矩陣)蛤育。
# import sample data
GCMat <- readRDS("./example/data.Rdata")
GCMat<- as(GCMat,"dgCMatrix")
# import sample annotation
BarCluFile <- "./example/barcodetype.txt"
BarCluTable <- read.table(BarCluFile,sep = "\t",header = TRUE,stringsAsFactors = FALSE)
我們這里以配體為B細(xì)胞,受體為Secretory為例
types <- unique(BarCluTable$Cluster)
LigClu <- "B cells" #types[4]
RecClu <- "Secretory" #types[8]
參數(shù)設(shè)置
默認(rèn)參數(shù)設(shè)置如下。 用戶可以提供自己的數(shù)據(jù)庫瓦糕,其中必須包括三個列:分子A底洗,分子B和密鑰(用下劃線將A與B連接起來)。 分子A和B需要具有清晰的身份(即配體咕娄,受體亥揖,TF和靶標(biāo)基因),并且它們之間應(yīng)存在相互作用 (這里我們用本身數(shù)據(jù)庫的就好)圣勒。
根據(jù)sender細(xì)胞和receiver細(xì)胞之間基因表達百分比的差異(受pct參數(shù)影響)和比率(受logfc參數(shù)影響)费变,我們首先在兩種細(xì)胞中分別定義特定的高表達基因。(這里差異基因的選擇我們需要注意)圣贸。
sender細(xì)胞中高表達的基因被認(rèn)為是潛在的配體挚歧,而receiver細(xì)胞中高表達的基因被認(rèn)為是潛在的受體和靶基因。 我們通過在數(shù)據(jù)庫中搜索配體-受體對來篩選潛在的配體-受體相互作用吁峻。 然后滑负,我們通過Fisher精確檢驗(受pval參數(shù)限制)篩選潛在的受體-TF,TF-Target基因相互作用用含。(構(gòu)建這個網(wǎng)絡(luò)信息矮慕,很重要)。
pval <- 0.05
logfc <- 0.15
LigRecLib <- "./database/LigRec.txt"
TFTarLib <- "./database/TFTargetGene.txt"
RecTFLib <- "./database/RecTF.txt"
Construction of Multi-layer Signaling Networks
獲得高表達基因的運行時間取決于兩種類型細(xì)胞中基因表達的t檢驗啄骇。 并行執(zhí)行t檢驗可以提高scMLnet的性能(前提:已安裝并行軟件包)凡傅。
netList <- RunMLnet(GCMat, BarCluFile, RecClu, LigClu,
pval, logfc,
LigRecLib, TFTarLib, RecTFLib)
###這個函數(shù)沒有其他的參數(shù)
Save and Visualization of Multi-layer Signaling Networks
輸出netList是由連接每個上游層和下游層(即Ligand_Receptor,Receptor_TF和TF_Gene子網(wǎng)絡(luò))的基因?qū)M成的列表肠缔。 信令子網(wǎng)作為數(shù)據(jù)幀對象返回夏跷,其結(jié)構(gòu)與示例數(shù)據(jù)庫相同。
workdir <- "sample"
DrawMLnet(netList,LigClu,RecClu,workdir,PyHome,plotMLnet = T)
Construction of Multi-cellular Multi-layer Signaling Networks
import data
GCMat <- readRDS("./example/data.Rdata")
GCMat<- as(GCMat,"dgCMatrix")
# import annotation
BarCluFile <- "./example/barcodetype.txt"
BarCluTable <- read.table(BarCluFile,sep = "\t",header = TRUE,stringsAsFactors = FALSE)
## get LigClu
LigClus <- unique(BarCluTable$Cluster)
LigClus <- LigClus[-grep("Secretory|Doublets",LigClus)]
## creat MLnet
netList <- list()
for(ligclu in LigClus){
#sender cell and receiver cell
LigClu <- ligclu
RecClu <- "Secretory"
name <- paste(strsplit(LigClu,split = "\\W")[[1]][1],RecClu,sep = "_")
#main
netList[[name]] <- RunMLnet(GCMat,BarCluFile,RecClu,LigClu)
}
## save output and plot MLnet
workdir <- "multi-cellular"
for (name in names(netList)) {
#scMLnet output
MLnetList <- netList[[name]]
print(paste0(name,":"))
#sender cell and receiver cell
LigClu <- strsplit(name,"_")[[1]][1]
RecClu <- strsplit(name,"_")[[1]][2]
#main
PyHome <- "D:/Miniconda3/envs/R36/python.exe" #for Window
DrawMLnet(MLnetList,LigClu,RecClu,workdir,PyHome,plotMLnet = T)
}
分析方法相當(dāng)不錯
生活很好明未,有你更好