Question: function getAE from ArrayExpress needs update because EBI has switched to https
2
gravatar for Bernd Klaus
18 months ago by
Bernd Klaus540
Germany
Bernd Klaus540 wrote:

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 rcurl xml http ebi • 865 views
ADD COMMENTlink modified 18 months ago by Wolfgang Huber13k • written 18 months ago by Bernd Klaus540

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

ADD REPLYlink written 18 months ago by peirinl0
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 REPLYlink written 18 months ago by Bernd Klaus540

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

ADD REPLYlink written 18 months ago by peirinl0
Answer: function getAE from ArrayExpress needs update because EBI has switched to https
0
gravatar for Wolfgang Huber
18 months ago by
EMBL European Molecular Biology Laboratory
Wolfgang Huber13k wrote:

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

ADD COMMENTlink written 18 months ago by Wolfgang Huber13k

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 REPLYlink written 18 months ago by ugis20
1

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 REPLYlink written 18 months ago by Mike Smith3.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 158 users visited in the last hour