美文网首页单细胞测序单细胞单细胞测序
10X单细胞通讯分析之scMLnet(配受体与TF,差异基因(靶

10X单细胞通讯分析之scMLnet(配受体与TF,差异基因(靶

作者: 单细胞空间交响乐 | 来源:发表于2021-04-16 16:43 被阅读0次

    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

    分析方法相当不错

    生活很好,有你更好

    相关文章

      网友评论

        本文标题:10X单细胞通讯分析之scMLnet(配受体与TF,差异基因(靶

        本文链接:https://www.haomeiwen.com/subject/zjfelltx.html