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

时间:2017-10-12 21:45:11

标签: 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命令发生了什么变化?或者我做错了什么?

1 个答案:

答案 0 :(得分:2)

这更像是一种解决方法,然后是对这个问题的明确答案。 但现在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