检索 BiomaRt 中的 SNP 位置,命令挂起

标签 r biomart

我试图检索有关 SNP 位置的信息。我尝试按照该网站的答案的说明进行操作,但该命令不再起作用:

library(biomaRt) # biomaRt_2.30.0

snp_mart = useMart("ENSEMBL_MART_SNP", dataset="hsapiens_snp")

snp_ids = c("rs16828074", "rs17232800")
snp_attributes = c("refsnp_id", "chr_name", "chrom_start")

snp_locations = getBM(attributes=snp_attributes, filters="snp_filter", 
                      values=snp_ids, mart=snp_mart)

等待很长时间后出现以下错误:

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.

自上一个版本以来,biomaRt 命令有什么变化吗?还是我做错了什么?

最佳答案

这更像是一个解决方法,而不是这个问题的明确答案。 但现在 Ensembl 的版本为 90。如果我使用以前版本(v89,来自 http://may2017.archive.ensembl.org )的存档主机,SNP 数据集将再次工作。因此,当 v90 不适用于 SNP 时,这是我的临时解决方案:

library("biomaRt")
snp_mart = useMart(biomart = "ENSEMBL_MART_SNP", dataset="hsapiens_snp", host='may2017.archive.ensembl.org')

snp_ids = c("rs16828074", "rs17232800")

snp_attributes = c("refsnp_id", "chr_name", "chrom_start")

snp_locations = getBM(attributes=snp_attributes, filters="snp_filter", 
                       values=snp_ids, mart=snp_mart)

结果应如下所示:

snp_locations
   refsnp_id chr_name chrom_start
1 rs16828074        2   231454043
2 rs17232800       18    68625022

关于检索 BiomaRt 中的 SNP 位置,命令挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46719355/

相关文章:

r - 为 linux 安装 biomaRt 包(R 版本 3.5.2)(Ubuntu for Windows)

r - 将 GENCODE ID 转换为 Ensembl - Ranged SummarizedExperiment

sql - 使用 SQL 连接和子查询查询 R 中的两个表

r - 如何为每列制作因变量标签 Stargazer

r - R : Spanish language not working 中的斯坦福 CoreNLP

R如何安装指定版本的bioconductor包?

r - r 中两个表的 PIL 逊相关系数

r - 如何将 "descending sort in data table"包装成一个函数?

r - 对于字符向量,是否有等同于 dplyr::between 的东西?