function getAE from ArrayExpress needs update because EBI has switched to https
1
2
Entering edit mode
Bernd Klaus ▴ 610
@bernd-klaus-6281
Last seen 6.2 years ago
Germany

Dear ArrayExpress development team,

EBI services (<https://www.ebi.ac.uk/services>), including ArrayExpress have switched to https on October 1st 2017.  The function getAE from the ArrayExpress Bioconductor package needs an update, as any retrieval fails like so:

library(ArrayExpress)

getAE("E-MTAB-5225")
Unknown IO error failed to load external entity "http://www.ebi.ac.uk/arrayexpress/xml/v2/files/E-MTAB-5225"
Error: 1: Unknown IO error2: failed to load external entity "http://www.ebi.ac.uk/arrayexpress/xml/v2/files/E-MTAB-5225"

Inspired by

<https://stackoverflow.com/questions/23584514/error-xml-content-does-not-seem-to-be-xml-r-3-1-0>

I have uploaded a gist that uses RCurl::getURL to fix this

<https://gist.github.com/b-klaus/f2a502109f852702bf7efc5ad5c0bd11>

I only change two lines of code in the function, my new getAE code:

baseURL = "https://www.ebi.ac.uk/arrayexpress/xml/v2/files"
xmlURL = getURL(paste(baseURL, accession, sep = "/"))

old getAE code

baseURL = "http://www.ebi.ac.uk/arrayexpress/xml/v2/files"
xmlURL = paste(baseURL, accession, sep = "/")

Thanks for updating!

Bernd

arrayexpress xml rcurl http EBI • 3.2k views
ADD COMMENT
0
Entering edit mode

Sorry, could you please tell me, or point me to a reference, how to fix a .R file such as getAE.R?

ADD REPLY
0
Entering edit mode
The team will update the function. In the meantime you can simply use my function https_getAE in the the github gist linked to above in order to make it work again.
ADD REPLY
0
Entering edit mode

Thanks, I managed to edit getAE.R using trace("getAE.R", edit=TRUE). I simply copy and paste your function. Thank you. 

ADD REPLY
0
Entering edit mode
@wolfgang-huber-3550
Last seen 3 months ago
EMBL European Molecular Biology Laborat…

I was informed by the ArrayExpress package maintainer Ugis Sarkans that they plan to restore http access to ArrayExpress APIs.

ADD COMMENT
0
Entering edit mode

After looking more at this - the package will need to be fixed, like Bernd suggested. HTTP->HTTPS redirect is in place already (e.g., http://www.ebi.ac.uk/arrayexpress/xml/v2/files/E-MTAB-5225 works in a browser), the problem is the XML package that cannot deal with this.

ADD REPLY
1
Entering edit mode

IMO Bernd's solution looks pretty good for minimal changes to the package code.  It just uses RCurl to read the xml into a character variable, which is then parsed with XML in the same way as before, rather than giving the URL directly.

ADD REPLY

Login before adding your answer.

Traffic: 580 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6