2

我试图检索有关 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 命令有什么变化吗?还是我做错了什么?

4

1 回答 1

3

这更像是一种解决方法,然后是对这个问题的明确答案。但是现在 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
于 2017-10-12T22:13:41.440 回答