10X單細胞通訊分析之scMLnet(配受體與TF,差異基因(靶基因)網絡通訊分析)

hi 各位,今天周五了,要開會的關系,沒有那么多時間準備分享文獻了,但是我很想和大家分享這個方法,類似于多組學分析,配受體與TF分析聯合起來的網絡分析結果,非常有價值(配體,受體,靶基因,TF多層網絡結構,非常贊),我們今天就不分享文獻了,多關注一下代碼,文章在Inferring microenvironmental regulation of gene expression from single-cell RNA sequencing data using scMLnet with an application to COVID-19, 2020年底發表于Briefings in Bioinformatics,影響因子9分。

Introduction

scMLnet是一個R軟件包,用于根據單細胞RNA-seq表達數據構建細胞間/細胞內多層信號交換網絡。 scMLnet通過基于細胞類型特異性基因表達,先驗網絡信息和統計推斷,整合細胞間途徑(配體-受體相互作用)和細胞內子網絡(受體-TF途徑以及TF-靶基因相互作用),構建多層網絡。 scMLnet還可以可視化中央細胞和鄰近細胞之間構建的細胞間/細胞內信號通路。

The main steps of the scMLnet algorithm include:

(1) Step1 Constructing Ligand-Receptor subnetwork:

通過獲取高度表達的基因(HEG),從scRNA-Seq數據和配體受體數據庫定義潛在的配體受體子網。 類型A(發送者細胞)中的HEG被視為潛在的配體,類型B(受體細胞)中的HEG被視為潛在的受體。

(2) Step2 Constructing TF-Target gene subnetwork

通過獲取HEG和Fisher的精確檢驗(這個可以參考文章Fisher 精確檢驗與卡方檢驗(10X單細胞和10X空間轉錄組的基礎知識)),從scRNA-Seq數據和TF-Target基因數據庫中定義了有效的TF-Target基因子網絡。 B型HEG被認為是潛在的靶基因。 可以從TF-Target基因子網絡中推斷出激活的TF。

(3) Step3 Constructing Receptor-TF subnetwork

通過Fisher的精確測試從激活的TF和Receptor-TF數據庫中定義了有效的Receptor-TF子網。 激活的受體可以從TF-Target基因子網絡中推斷出來。

(4)Step4 constructing multi-layer signaling network

通過在受體與TF,TF和靶基因之間進行相關分析,然后根據共同的受體和TF重疊配體-受體,TF-靶基因,受體-TF子網來定義多層信號網絡。 (相當贊)。

圖片.png

輸入和輸出

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細胞,受體為Secretory為例

types <- unique(BarCluTable$Cluster)
LigClu <- "B cells"       #types[4]
RecClu <- "Secretory"     #types[8]

參數設置

默認參數設置如下。 用戶可以提供自己的數據庫,其中必須包括三個列:分子A,分子B和密鑰(用下劃線將A與B連接起來)。 分子A和B需要具有清晰的身份(即配體,受體,TF和靶標基因),并且它們之間應存在相互作用 (這里我們用本身數據庫的就好)。
根據sender細胞和receiver細胞之間基因表達百分比的差異(受pct參數影響)和比率(受logfc參數影響),我們首先在兩種細胞中分別定義特定的高表達基因。(這里差異基因的選擇我們需要注意)。
sender細胞中高表達的基因被認為是潛在的配體,而receiver細胞中高表達的基因被認為是潛在的受體和靶基因。 我們通過在數據庫中搜索配體-受體對來篩選潛在的配體-受體相互作用。 然后,我們通過Fisher精確檢驗(受pval參數限制)篩選潛在的受體-TF,TF-Target基因相互作用。(構建這個網絡信息,很重要)。

 pval <- 0.05
 logfc <- 0.15
 LigRecLib <- "./database/LigRec.txt"
 TFTarLib <- "./database/TFTargetGene.txt"
 RecTFLib <- "./database/RecTF.txt"

Construction of Multi-layer Signaling Networks

獲得高表達基因的運行時間取決于兩種類型細胞中基因表達的t檢驗。 并行執行t檢驗可以提高scMLnet的性能(前提:已安裝并行軟件包)。

netList <- RunMLnet(GCMat, BarCluFile, RecClu, LigClu, 
                        pval, logfc, 
                        LigRecLib, TFTarLib, RecTFLib)
###這個函數沒有其他的參數

Save and Visualization of Multi-layer Signaling Networks

輸出netList是由連接每個上游層和下游層(即Ligand_Receptor,Receptor_TF和TF_Gene子網絡)的基因對組成的列表。 信令子網作為數據幀對象返回,其結構與示例數據庫相同。

workdir <- "sample"
DrawMLnet(netList,LigClu,RecClu,workdir,PyHome,plotMLnet = T)
圖片.png

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)
  
}
圖片.png

分析方法相當不錯

生活很好,有你更好

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
禁止轉載,如需轉載請通過簡信或評論聯系作者。