【问题标题】:Unable to use biomaRt package to get Gene Symbols from Entrez IDs无法使用 biomaRt 包从 Entrez ID 获取基因符号
【发布时间】:2016-11-10 23:19:38
【问题描述】:

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

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)

但我收到以下错误:

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.")

【问题讨论】:

  • 不带主机参数再试一次。我很确定这是您或 biomart 网站上的连接问题。

标签: r bioinformatics bioconductor biomart


【解决方案1】:
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 的行都是相同的。对于您的情况,在 attributes = "entrezgene" 中,而不是我使用 "ensembl_gene_id" 会很有用。合并是重要的一步。在我的情况下,在合并时,by.x=“X”意味着,在 my_ids csv 中,ensemblegeneid 位于名为“X”的列中。所以我基本上要说的是,从 my_ids 将 X 列与 results_end_1 的“ensembl_gene_id”列匹配并合并。如果有什么不清楚的,请询问。 费拉特

【讨论】:

    【解决方案2】:

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

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

    这解决了我的问题。

    希望对你也有帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-13
      • 1970-01-01
      • 2017-12-23
      • 1970-01-01
      • 2022-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多