This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieving species information from ensembl bacteria in JSON doesn't work

When I try to retrieve the information with

$wget -O bacterias.txt http://rest.ensemblgenomes.org/info/species?content-type=application/json;compara=bacteria

my download doesn't surpasses the 87%

--2017-01-17 13:27:17--  http://rest.ensemblgenomes.org/info/species?content-type=application/json
Resolviendo rest.ensemblgenomes.org rest.ensemblgenomes.org)... 193.62.192.83
Conectando con rest.ensemblgenomes.org rest.ensemblgenomes.org)[193.62.192.83]:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 14291898 (14M) [application/json]
Grabando a: “bacterias.txt”

bacterias.txt                   86%[=============================================>        ]  11,75M  --.-KB/s   en 2m 15s 

2017-01-17 13:29:41 (89,3 KB/s) - Conexión cerrada en el byte 12320768. Reintentando.

My OS is in Spanish, but I guess you can understand: the download never ends, the connections closes and then wget retries the operation indefinitely.

When I try using xml

wget -O bacterias.txt http://rest.ensemblgenomes.org/info/species?content-type=text/xml;compara=bacteria

everything works fine. Do you know any workaround to get this information in JSON format?

ensemble api rest

Problem must be on your end (check on Firewall restrictions etc). JSON download worked.

JSON works for me:

$ wget -O - "http://rest.ensemblgenomes.org/info/species?content-type=application/json;compara=bacteria" | wc -c
--2017-01-17 19:10:10--  http://rest.ensemblgenomes.org/info/species?content-type=application/json;compara=bacteria
Resolving rest.ensemblgenomes.org rest.ensemblgenomes.org)... 193.62.193.83
Connecting to rest.ensemblgenomes.org rest.ensemblgenomes.org)|193.62.193.83|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14291898 (14M) [application/json]
Saving to: ‘STDOUT’

100%[======================================>] 14 291 898   219KB/s   in 63s    

2017-01-17 19:11:14 (221 KB/s) - written to stdout [14291898/14291898]

14291898

Ok, I'm deleting then. I tried two networks in two different computers. Probably just bad luck.

0 answers

No answers yet.

Log in to answer this question.