【问题标题】:Gene ontology (GO) analysis for a list of Genes (with ENTREZID) in R?R中基因列表(带有ENTREZID)的基因本体(GO)分析?
【发布时间】:2016-05-19 05:07:02
【问题描述】:

我对 GO 分析非常陌生,我有点困惑如何在我的基因列表中进行分析。

我有一个基因列表(n=10):

gene_list

    SYMBOL ENTREZID                              GENENAME
1    AFAP1    60312   actin filament associated protein 1
2  ANAPC11    51529 anaphase promoting complex subunit 11
3   ANAPC5    51433  anaphase promoting complex subunit 5
4     ATL2    64225                     atlastin GTPase 2
5    AURKA     6790                       aurora kinase A
6    CCNB2     9133                             cyclin B2
7    CCND2      894                             cyclin D2
8    CDCA2   157313      cell division cycle associated 2
9    CDCA7    83879      cell division cycle associated 7
10  CDCA7L    55536 cell division cycle associated 7-like

我只是想找到它们的功能,有人建议我使用 GO 分析工具。 我不确定这是否是正确的方法。 这是我的解决方案:

x

# Get the entrez gene identifiers that are mapped to a GO ID

    xx<- as.list(x[gene_list$ENTREZID])

所以,我有一个带有 EntrezID 的列表,它被分配给每个基因的几个 GO 术语。 例如:

> xx$`60312`
$`GO:0009966`
$`GO:0009966`$GOID
[1] "GO:0009966"

$`GO:0009966`$Evidence
[1] "IEA"

$`GO:0009966`$Ontology
[1] "BP"


$`GO:0051493`
$`GO:0051493`$GOID
[1] "GO:0051493"

$`GO:0051493`$Evidence
[1] "IEA"

$`GO:0051493`$Ontology
[1] "BP"

我的问题是: 我怎样才能以更简单的方式找到这些基因中的每一个的功能,我也想知道我做得对吗? 因为我想将函数作为函数/GO 列添加到gene_list。

提前致谢,

【问题讨论】:

标签: r analysis ontology genetics


【解决方案1】:

编辑:有一个新的Bioinformatics SE(目前处于测试模式)。


我希望我能得到你的目标。

顺便说一句,对于生物信息学相关主题,您还可以查看biostar,它与 SO 具有相同的目的,但用于生物信息学

如果你只是想要一个与基因相关的每个功能的列表,你可以通过biomaRtbioconductor包查询ENSEMBl等数据库,这是一个查询biomart数据库的API。 您需要互联网才能进行查询。

Bioconductor 提出了用于生物信息学研究的软件包,这些软件包通常带有很好的小插曲,可以帮助您完成分析的不同步骤(甚至强调您应该如何设计数据,或者哪些会成为其中的一些陷阱)。

在你的情况下,直接来自biomaRt vignette - 特别是任务2:

注意:我在下面报告的方法稍微快一些:

# load the library
library("biomaRt")

# I prefer ensembl so that the one I will query, but you can
# query other bases, try out: listMarts() 
ensembl=useMart("ensembl")

# as it seems that you are looking for human genes:
ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)
# if you want other model organisms have a look at:
#listDatasets(ensembl)

您需要创建查询(您的 ENTREZ id 列表)。要查看您可以查询哪些过滤器:

filters = listFilters(ensembl)

然后您要检索属性:您的 GO 编号和描述。查看可用属性列表

attributes = listAttributes(ensembl)

对你来说,查询看起来像这样:

goids = getBM(

        #you want entrezgene so you know which is what, the GO ID and
        # name_1006 is actually the identifier of 'Go term name'
        attributes=c('entrezgene','go_id', 'name_1006'), 

        filters='entrezgene', 
        values=gene_list$ENTREZID, 
        mart=ensembl)

查询本身可能需要一段时间。

然后,您可以随时将信息折叠成两列(但我不建议将其用于其他任何报告目的)。

Go.collapsed<-Reduce(rbind,lapply(gene_list$ENTREZID,function(x)
                           tempo<-goids[goids$entrezgene==x,]
                           return(
                                   data.frame('ENTREZGENE'= x,
                                  'Go.ID'= paste(tempo$go_id,collapse=' ; '),
                                  'GO.term'=paste(tempo$name_1006,collapse=' ; '))
)


编辑:

如果要查询 ensembl 数据库的过去版本:

ens82<-useMart(host='sep2015.archive.ensembl.org',
               biomart='ENSEMBL_MART_ENSEMBL',
               dataset='hsapiens_gene_ensembl')

然后查询将是:

goids = getBM(attributes=c('entrezgene','go_id', 'name_1006'),  
        filters='entrezgene',values=gene_list$ENTREZID, 
        mart=ens82)


但是,如果您打算进行 GO 富集分析,那么您的基因列表太短了。

【讨论】:

  • 使用dplyr 折叠信息可能有更好、更优雅的方式
  • 非常感谢!我仍然对 getBM 有问题,因为 BioMart 网络服务暂时停止了! :/ "值错误[[3L]](cond) : 对 BioMart 网络服务的请求失败。验证您是否仍然连接到互联网。或者 BioMart 网络服务暂时关闭。"
  • @user3576287 实际上,是的,看起来确实如此。如果您不介意使用稍旧的 ensembl 版本(即 2015 年 9 月而不是 2015 年 12 月发布的版本),它可以工作。要检索以前的版本:ens82&lt;-useMart(host='sep2015.archive.ensembl.org', biomart='ENSEMBL_MART_ENSEMBL', dataset='hsapiens_gene_ensembl') 然后在查询中您应该用mart=ens82 替换mart=ensembl
  • biomart 自 2015 年 10 月以来似乎没有更新。
  • @par,我不知道您对 GRCh37 或 GRCh38(默认)是什么意思,可通过 R 包访问的最新版本是 2017 年 5 月发布的“Ensembl Genes 89”。 (基本上和网站本身显示的版本一样:ensembl.org/biomart/martview
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-05-06
  • 2023-03-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-05-19
相关资源
最近更新 更多