markziemann / dee2

Digital Expression Explorer 2 (DEE2): a repository of uniformly processed RNA-seq data
http://dee2.io
GNU General Public License v3.0
39 stars 7 forks source link

When using the R API on windows, the file cannot be found #51

Closed markziemann closed 5 years ago

markziemann commented 5 years ago

download.file("http://dee2.io/cgi-bin/request.sh?org=celegans&x=SRR363798&x=SRR363799",destfile="dee2data.zip")

Under windows, the ZIP file is being called invalid. No such problem with the Unix version.

markziemann commented 5 years ago

Stack overflow to the rescue https://stackoverflow.com/questions/48832672/download-file-produces-invalid-zip-file-on-windows-but-works-fine-on-mac

markziemann commented 5 years ago

this was due to the behaviour of download.file() in R trying to download as text file and not as binary. using the option mode="wb" fixed it