Closed MasakiLin closed 3 years ago
Thanks for letting us know.
Sorry for the trouble. I will not address this issue this any time soon.
Issue #10 shows a viable alternative:
library(httr)
library(jsonlite)
library(xml2)
server <- "http://grch37.rest.ensembl.org"
ext <- "/ld/human/rs42/1000GENOMES:phase_3:EUR"
r <- GET(paste(server, ext, sep = ""), content_type("application/json"))
stop_for_status(r)
# use this if you get a simple nested list back, otherwise inspect its structure
# head(data.frame(t(sapply(content(r),c))))
head(fromJSON(toJSON(content(r))))
#> population_name r2 d_prime variation1 variation2
#> 1 1000GENOMES:phase_3:EUR 0.060888 0.790030 rs42 rs12699249
#> 2 1000GENOMES:phase_3:EUR 0.147759 0.861987 rs42 rs17633604
#> 3 1000GENOMES:phase_3:EUR 0.128357 0.781375 rs42 rs10486144
#> 4 1000GENOMES:phase_3:EUR 0.334122 0.936431 rs42 rs29
#> 5 1000GENOMES:phase_3:EUR 0.060888 0.790030 rs42 rs12699248
#> 6 1000GENOMES:phase_3:EUR 0.629504 0.978462 rs42 rs15
Created on 2020-08-07 by the reprex package (v0.3.0)
Hi, I also want to find proxies by variants' position, because I wan to get the position of the proxies directly. There is an error message as the following:
d <- get_proxies(chrom = "12", pos = 583090, window_size = 1e5, pop = "AFR") Error in function (type, msg, asError = TRUE) : Could not resolve host: tabix.iobio.io
Issue #10 shows a viable alternative:
library(httr) library(jsonlite) library(xml2) server <- "http://grch37.rest.ensembl.org" ext <- "/ld/human/rs42/1000GENOMES:phase_3:EUR" r <- GET(paste(server, ext, sep = ""), content_type("application/json")) stop_for_status(r) # use this if you get a simple nested list back, otherwise inspect its structure # head(data.frame(t(sapply(content(r),c)))) head(fromJSON(toJSON(content(r)))) Created on 2020-08-07 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)
Hi,
When I ran your example, there is an error message. Please see below: