前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >RcisTarget||转录因子结合基序富集

RcisTarget||转录因子结合基序富集

作者头像
生信编程日常
发布2020-10-29 11:15:55
3.9K0
发布2020-10-29 11:15:55
举报
文章被收录于专栏:生物信息学、python、R、linux
RcisTarget准备

1.安装RcisTarget所需要的程序包

代码语言:javascript
复制
BiocManager::install(c("AUCell", "RcisTarget"))

另外,可以安装一些其他程序包用来R进行cisTarget的交互式展示:

代码语言:javascript
复制
if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")
# To support paralell execution:
BiocManager::install(c("doMC", "doRNG"))
# For the examples in the follow-up section of the tutorial:
BiocManager::install(c("DT", "visNetwork"))
RcisTarget主要输入参数是基因列表和基序数据库

下载RcisTarget使用所需的数据库,包括两种数据库:

  1. Gene-motif rankings: which provides the rankings (~score) of all the genes for each motif.
  2. The annotation of motifs to transcription factors.
Gene-motif rankings下载

每对基因基序的得分可以用不同的参数来进行。因此,我们提供多个数据库(motif-rankings),根据以下几种可能性:

  • Species: Species of the input gene set. Available values: Human (Homo sapiens), mouse (Mus musculus) or fly (Drosophila melanogaster)
  • Scoring/search space: determine the search space around the transcription start site (TSS). Available values: 500 bp uptream the TSS, 5kbp or 10kbp around the TSS (e.g. 10kbp upstream and 10kbp downstream of the TSS).
  • Number of orthologous species taken into account to score the motifs (e.g. conservation of regions). Available values: 7 or 10 species

具体的数据库在:https://resources.aertslab.org/cistarget/ 可以直接下载,也可以通过以下链接下载

代码语言:javascript
复制
featherURL <- "https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-tss-centered-10kb-7species.mc9nr.feather" 
download.file(featherURL, destfile=basename(featherURL))
annotation of motifs to TF

RcisTarget进行的所有计算均基于motif。但是,大多数用户对可能调节gene list的TF感兴趣。因此需要提供motif与转录因子的相关联的文件。 对于“ mc9nr”版本中的motif 注释,已包含在RcisTarget软件包中,并且可以使用以下命令加载:

代码语言:javascript
复制
# mouse:
# data(motifAnnotations_mgi)
# human:
data(motifAnnotations_hgnc)

对于其他版本的motif,可以使用importAnnotations从源文件导入。

RcisTarget运行
代码语言:javascript
复制
library(RcisTarget)
# Load gene sets to analyze.
geneList1 <- read.table(file.path(system.file('examples', package='RcisTarget'), "hypoxiaGeneSet.txt"), stringsAsFactors=FALSE)[,1]
head(geneList1)
#> head(geneList1)
#>"ADM"     "ADORA2B" "AHNAK2"  "AK4"     "AKAP12"  "ALDOC"  
代码语言:javascript
复制
geneLists <- list(geneListName=geneList1)
 
# Select motif database to use (i.e. organism and distance around TSS)
data(motifAnnotations_hgnc)
#Import the motif databases for RcisTarget.
#featherURL <- "https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-tss-centered-10kb-7species.mc9nr.feather" 
#download.file(featherURL, destfile=basename(featherURL)) 
motifRankings <- importRankings("hg19-tss-centered-10kb-7species.mc9nr.feather")

# Motif enrichment analysis:
motifEnrichmentTable_wGenes <- cisTarget(geneLists, motifRankings,
                               motifAnnot=motifAnnotations_hgnc)
RcisTarget输出:

RcisTarget的最终输出的data.table包含有关motif 富集的以下信息:

geneSet:基因集的名称 motif:motif的ID NES:基因集中基序的标准化富集得分 AUC:曲线下的面积(用于计算NES) TFinDB:指示突出显示的TF是包含在高置信度注释(两个星号)还是低置信度注释(一个星号)中。 TF_highConf:根据'motifAnnot_highConfCat'注释到基序的转录因子。 TF_lowConf:根据'motifAnnot_lowConfCat'注释到主题的转录因子。 erichedGenes:在给定motif上排名较高的基因。 nErnGenes:高度排名的基因数量 rankAtMax:在最大富集时的排名,用于确定富集的基因数。

结果可视化
代码语言:javascript
复制
motifEnrichmentTable_wGenes_wLogo <- addLogo(motifEnrichmentTable_wGenes)

resultsSubset <- motifEnrichmentTable_wGenes_wLogo[1:10,]

library(DT)
datatable(resultsSubset[,-c("enrichedGenes", "TF_lowConf"), with=FALSE], 
          escape = FALSE, # To show the logo
          filter="top", options=list(pageLength=5))

参考:https://bioconductor.org/packages/devel/bioc/vignettes/RcisTarget/inst/doc/RcisTarget.html

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • RcisTarget准备
    • RcisTarget主要输入参数是基因列表和基序数据库
      • Gene-motif rankings下载
        • annotation of motifs to TF
        • RcisTarget运行
        • RcisTarget输出:
        • 结果可视化
        相关产品与服务
        数据库
        云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档