On Fri, Sep 18, 2009 at 11:20 AM, Sailu Yellaboina <yellaboinas@gmail.com>wrote:

> Hi Friends
> I am getting the following error in using the GEOquery.  Funny thing is
> some
> times it does not show any error with the same dataset. There was a
> discussion about
> this error here <
> https://stat.ethz.ch/pipermail/bioconductor/2007-December/020471.html > .
>  I
> want to known if there is any alternative solution is there for this
> problem
> (changing the code). I am able to download the dataset (
>
> ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SeriesMatrix/GSE8024/GSE8024_series_matrix.txt.gz
> )
> using the wget.
>
> dataset.name<-'GSE8024'
> gse<- getGEO(dataset.name, destdir=".")
> Found 1 file(s)
> GSE8024_series_matrix.txt.gz
> trying URL '
>
> ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SeriesMatrix/GSE8024/GSE8024_series_matrix.txt.gz
> '
> Error in download.file(sprintf("
> ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SeriesMatrix/%s/%s",  :
> cannot open URL '
>
> ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SeriesMatrix/GSE8024/GSE8024_series_matrix.txt.gz
> '
> Calls: getGEO -> getAndParseGSEMatrices -> download.file
> Execution halted
>
>
Hi, Sailu.

This is not a GEOquery problem or a problem with anything locally, I don't
think.  The FTP server at NCBI is sometimes busy and doesn't accept the
connection.  If you try your query later, it will likely work.  You could
also use a loop wrapped around a "try" command something like what is shown
below:

Hope this helps.

Sean

-----------------------------

loopGetGEO <- function(...) {
 returnGEO <- NULL
 notdone <- TRUE
 while(notdone) {
 returnGEO <- try(getGEO(...))
 if(!inherits(returnGEO,"try-error")) notdone <- FALSE
 else cat("Caught an error in getGEO, so trying again....\n")
 }
 return(returnGEO)
 }

> gse <- loopGetGEO("GSE8024")
Found 1 file(s)
GSE8024_series_matrix.txt.gz
trying URL '
ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SeriesMatrix/GSE8024/GSE8024_series_matrix.txt.gz
'
Error in download.file(sprintf("
ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SeriesMatrix/%s/%s",  :
  cannot open URL '
ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SeriesMatrix/GSE8024/GSE8024_series_matrix.txt.gz
'
Caught an error in getGEO, so trying again....
Found 1 file(s)
GSE8024_series_matrix.txt.gz
trying URL '
ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SeriesMatrix/GSE8024/GSE8024_series_matrix.txt.gz
'
ftp data connection made, file length 1520554 bytes
opened URL
==================================================
downloaded 1.5 Mb

	[[alternative HTML version deleted]]

