[R-SIG-Mac] GEO querry, Rcurl, and paths

Sean Davis sdavis2 at mail.nih.gov
Mon Jun 20 19:22:20 CEST 2011


Thanks, Julin, for the report.

This looks like it may be a problem with using
options('download.file.method'='curl') which is, currently, the
default for GEOquery.  Here is what I see in R-devel:

# Set up a directory with a space in the filename
> setwd('/tmp')
> dir.create('R Club')
> setwd('/tmp/R Club')

# Default works fine
> download.file('ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE4847/filelist.txt',destfile=file.path(getwd(),'filelist.txt'))
trying URL 'ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE4847/filelist.txt'
ftp data connection made, file length 1063 bytes
opened URL
==================================================
downloaded 1063 bytes

# The 'curl' download file method seems to have a problem with
# a destfile path that include a space
> options('download.file.method'='curl')
> download.file('ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE4847/filelist.txt',destfile=file.path(getwd(),'filelist.txt'))
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
106  1063  106  1063    0     0   4558      0 --:--:-- --:--:-- --:--:-- 1038k
curl: (6) Couldn't resolve host 'Club'
Warning message:
In download.file("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE4847/filelist.txt",
 :
  download had nonzero exit status

The "curl" download.method is used by GEOquery because of an issue
with the default, "auto", under linux when used with the NCBI ftp
site.  On the Mac, setting:

options('download.file.method'='auto')

AFTER loading GEOquery should probably fix the problem.  I'll make
that change to the default behavior for GEOquery until there is a
chance to look into the 'curl' download method more fully.  I have not
tested download.file using 'curl' under linux or Windows yet.

Sean

> sessionInfo()
R version 2.14.0 Under development (unstable) (2011-06-08 r56096)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.utf-8/en_US.utf-8/en_US.utf-8/C/en_US.utf-8/en_US.utf-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] GEOquery_2.19.0 Biobase_2.13.2

loaded via a namespace (and not attached):
[1] RCurl_1.6-5 XML_3.4-0


On Mon, Jun 20, 2011 at 12:32 PM, Julin Maloof <jnmaloof at ucdavis.edu> wrote:
> Hello,
>
> Not sure if this is a mac problem or not, so feel free to suggest a
> redirect.
>
> I am using GEOquerry to download raw microarray files.  If there is a space
> in the path then curl gives an error.  If I remove the space from the path,
> no error.  I am pretty sure that this error did not exist on R 2.12.2
>
>> library(GEOquery)
>> library(limma)
>> library(affy)
>>
>> vte.supp <- getGEOSuppFiles(GEO="GSE4847")
> [1] "ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE4847/"
> 100 53.8M  100 53.8M    0     0   468k      0  0:01:57  0:01:57 --:--:--
>  493k 0:00:01 --:--:--     0
>
> curl: (6) Couldn't resolve host 'Club'
> 106  1063  106  1063    0     0     47      0  0:00:22  0:00:22 --:--:--
>  7433  0:00:22 --:--:--     0
>
> curl: (6) Couldn't resolve host 'Club'
> Warning messages:
> 1: In download.file(file.path(url, i), destfile = file.path(storedir,  :
>  download had nonzero exit status
> 2: In download.file(file.path(url, i), destfile = file.path(storedir,  :
>  download had nonzero exit status
>> sessionInfo()
> R version 2.13.0 (2011-04-13)
> Platform: i386-apple-darwin9.8.0/i386 (32-bit)
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] affy_1.30.0     limma_3.8.2     GEOquery_2.18.0 Biobase_2.12.1
>
> loaded via a namespace (and not attached):
> [1] affyio_1.20.0         preprocessCore_1.14.0 RCurl_1.6-5
> tools_2.13.0          XML_3.4-0
>> pwd()
> Error: could not find function "pwd"
>> getwd()
> [1] "/Users/jmaloof/Documents/Teaching/R Club"
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list