slowkow / proxysnps

:bookmark: Get SNP proxies from the 1000 Genomes Project.
MIT License
28 stars 9 forks source link

Error with tabix.iobio.io #16

Open swvanderlaan opened 3 years ago

swvanderlaan commented 3 years ago

Hi,

I am getting this error...

Could not resolve host: tabix.iobio.io

... when running this code:

d <- get_proxies(chrom = "12", pos = 583090, window_size = 1e5, pop = "AFR")

How can I fix this?

Best,

Sander

slowkow commented 3 years ago

Please try an alternative.


Alternative 1: LDproxy

https://ldlink.nci.nih.gov/?tab=ldproxy


Alternative 2: Ensembl

http://grch37.rest.ensembl.org/documentation/info/ld_region_get

Computes and returns LD values between all pairs of variants in the defined region.

http://grch37.rest.ensembl.org/documentation/info/ld_id_get

Computes and returns LD values between the given variant and all other variants in a window centered around the given variant. The window size is set to 500 kb.

Example code:

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