我试图检索有关 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/