首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用biomaRt包从Entrez ID获取基因符号

无法使用biomaRt包从Entrez ID获取基因符号
EN

Stack Overflow用户
提问于 2016-07-08 19:44:45
回答 2查看 727关注 0票数 2

我使用以下代码从Entrez ID中检索基因符号:

代码语言:javascript
复制
library("biomaRt")
ensembl <- useMart("ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = "www.ensembl.org")

g <- getBM(c("hgnc_symbol"), filters = "entrezgene", c(entrez), ensembl)

但我得到以下错误:

代码语言:javascript
复制
Error in value[[3L]](cond): Request to BioMart web service failed. Verify if you are still connected to the internet.  Alternatively the BioMart web service is temporarily down.
Traceback:

1. getBM(c("hgnc_symbol"), filters = "entrezgene", c(entrez), ensembl)
2. tryCatch(postForm(paste(martHost(mart), "?", sep = ""), query = xmlQuery), 
 .     error = function(e) {
 .         stop("Request to BioMart web service failed. Verify if you are still connected to the internet.  Alternatively the BioMart web service is temporarily down.")
 .     })
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
6. stop("Request to BioMart web service failed. Verify if you are still connected to the internet.  Alternatively the BioMart web service is temporarily down.")
EN

回答 2

Stack Overflow用户

发布于 2016-10-18 17:33:55

代码语言:javascript
复制
library(biomaRt)
marts <- listMarts()
ensembl <- useMart("ensembl")
datasets <- listDatasets(ensembl)
ensembl=useDataset("hsapiens_gene_ensembl",mart=ensembl)
attributes <- listAttributes(ensembl)
my_ids <- read.csv("/home/firat/Desktop/ahmet_deseq2_results.csv")
results_end_1 <- getBM(attributes = c("ensembl_gene_id","external_gene_name"), values = my_ids, mart = ensembl )
View(results_end_1)
merged_with_my_ids <- merge(my_ids,results_end_1,by.x = "X",by.y = ,"ensembl_gene_id")
View(merged_with_my_ids)

下面是我使用biomaRt的方法。我认为这是不言而喻的。对于每个脚本,直到my_ids的代码行都是一样的。对于您的情况,in attributes = "entrezgene“会比我使用"ensembl_gene_id”更有用。合并是一个重要的步骤。在我的例子中,在合并时,by.x= "X“意味着,在my_ids csv中,ensemblegeneid位于名为"X”的列中。因此,我的基本意思是,在my_ids中,将X列与results_end_1的"ensembl_gene_id“列进行匹配并合并。如果有什么不清楚的地方,请提出来。Fı速率

票数 0
EN

Stack Overflow用户

发布于 2016-10-19 01:40:21

打开Internet Explorer,转到您的ensembl函数的主机参数中使用的网站。

然后转到设置选项卡,并将其添加到您的可信网站列表中。

这为我解决了这个问题。

希望这对你也有帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38265798

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档