Displaying 9 results from an estimated 9 matches for "2egz".
2018 May 02
7
download.file does not process gz files correctly (truncates them?)
...z . If I download this
manually and try
oligo::read.celfiles("GSM907811.CEL.gz")
everything works fine. (oligo is a bioConductor package)
However, if I download using
download.file("
https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSM907811&format=file&file=GSM907811%2ECEL%2Egz
",
destfile = "GSM907811.CEL.gz")
The file is downloaded, but oligo::read.celfiles() returns the following
error:
Error in checkChipTypes(filenames, verbose, "affymetrix", TRUE) :
End of gz file reached unexpectedly. Perhaps this file is truncated.
Moreov...
2018 May 04
2
download.file does not process gz files correctly (truncates them?)
...les that are obviously binary, so it changes the default behavior
> only for cases when it would obviously cause damage.
>
> Tomas
Well, I was trying to download a .gz file and download.file() didn't detect
that. Reason for that is obviously that the link doesn't contain .gz but
%2Egz , using the ASCII code for the dot instead of the dot itself. That's
general practice in a lot of links.
Hence I propose to change the line in download.file() that does this check
to:
if (missing(mode) && length(grep("\\.(gz|bz2|xz|tgz|zip|rda|RData)$",...
2018 May 03
0
download.file does not process gz files correctly (truncates them?)
...ad.file() is actually larger (in this case by about 8 kb). The
file xxx_inR.CEL.gz is read in using:
setwd("E:/Temp/genexpr/Compare")
id <- "GSM907854"
flink <- paste0("
https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSM907854&format=file&file=GSM907854%2ECEL%2Egz
")
fname <- paste0(id,"_inR.CEL.gz")
download.file(flink,
destfile = fname)
The file xxx_direct.CEL.gz is downloaded from
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM907854 (download link
at the bottom of the page).
Output of dir in CMD:
05/03/2018 11:0...
2018 May 04
0
download.file does not process gz files correctly (truncates them?)
...ault behavior only
>> for cases when it would obviously cause damage.
>>
>> Tomas
> Well, I was trying to download a .gz file and
> download.file() didn't detect that. Reason for that is
> obviously that the link doesn't contain .gz but %2Egz ,
> using the ASCII code for the dot instead of the dot
> itself. That's general practice in a lot of links.
> Hence I propose to change the line in download.file() that
> does this check to:
> if (missing(mode) && length(grep("\\.(gz|bz2|xz|t...
2018 May 03
0
download.file does not process gz files correctly (truncates them?)
...> oligo::read.celfiles("GSM907811.CEL.gz")
>
> everything works fine. (oligo is a bioConductor package)
>
> However, if I download using
>
> download.file("
> https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSM907811&format=file&file=GSM907811%2ECEL%2Egz
> ",
> destfile = "GSM907811.CEL.gz")
On windows, the 'mode' argument to download.file() needs to be "wb"
(write binary) for binary files.
Martin
>
> The file is downloaded, but oligo::read.celfiles() returns the following
> error:...
2018 May 03
0
download.file does not process gz files correctly (truncates them?)
...gt; oligo::read.celfiles("GSM907811.CEL.gz")
>
> everything works fine. (oligo is a bioConductor package)
>
> However, if I download using
>
> download.file("
>
> https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSM907811&format=file&file=GSM907811%2ECEL%2Egz
> ",
> destfile = "GSM907811.CEL.gz")
>
> The file is downloaded, but oligo::read.celfiles() returns the following
> error:
>
> Error in checkChipTypes(filenames, verbose, "affymetrix", TRUE) :
> End of gz file reached unexpectedly. P...
2018 May 03
0
download.file does not process gz files correctly (truncates them?)
...M907811.CEL.gz")
>>
>> everything works fine. (oligo is a bioConductor package)
>>
>> However, if I download using
>>
>> download.file("
>> https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSM907811&for
>> mat=file&file=GSM907811%2ECEL%2Egz
>> ",
>> destfile = "GSM907811.CEL.gz")
>>
>
> On windows, the 'mode' argument to download.file() needs to be "wb" (write
> binary) for binary files.
>
> Martin
>
>
>> The file is downloaded, but oligo::rea...
2018 May 07
2
download.file does not process gz files correctly (truncates them?)
...for cases when it would obviously cause damage.
> >>
> >> Tomas
>
>
> > Well, I was trying to download a .gz file and
> > download.file() didn't detect that. Reason for that is
> > obviously that the link doesn't contain .gz but %2Egz ,
> > using the ASCII code for the dot instead of the dot
> > itself. That's general practice in a lot of links.
>
> > Hence I propose to change the line in download.file() that
> > does this check to:
>
> > if (missing(mode) &&...
2018 May 03
4
download.file does not process gz files correctly (truncates them?)
Also, as mentioned in my
https://stat.ethz.ch/pipermail/r-devel/2012-August/064739.html, when
not specifying the mode argument, the default on Windows is mode = "w"
*except* for certain, case-sensitive, filename extensions:
if(missing(mode) && length(grep("\\.(gz|bz2|xz|tgz|zip|rda|RData)$", url)))
mode <- "wb"
Just like the need for mode =