Dear Sean Davis, thanks for the reply. I turned off my firewall but problem is still persisting.
I am using 3.2.0 version of R on 64-bit system with Windows 7 OS. I am facing a problem while using the package GEOquery for bioinformatics
library(Biobase)
library(GEOquery)
library(limma)
library(RCurl)
library(XML)
getGEO("GSE1739", GSEMatrix = TRUE) # to get the data
I got the error
ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE1nnn/GSE1739/matrix/
Error in function (type, msg, asError = TRUE) :
Failed to connect to ftp.ncbi.nlm.nih.gov port 21: Timed out
Any help in this direction will be greatly appreciated.
2 answers
Hi Dear
Just type:
setInternet2(F)
then
getGEOSuppFiles("")
This is a network connection problem, most likely because your firewall is not allowing port 21 connections. You can check with your IT group to be sure. If that is the case, ask if there is a way that you can set up a proxy to connect to NCBI ftp services.
You are most likely going to have to troubleshoot this problem with someone at your local institution. Your issue seems to not be a problem with GEOquery but something specific to your setup.
I got the solution for the problem. I was setting proxy as Sys.setenv(http_proxy = "11.2.1.9:9090"). In addition I set FTP proxy as Sys.setenv(ftp_proxy = "11.2.1.9:9090"). But now I am getting different error.
gse <- getGEO("GSE1739",GSEMatrix=T)
ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE1nnn/GSE1739/matrix/
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 2 did not have 6 elements
Here is session Info
sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] GEOquery_2.34.0 RCurl_1.95-4.6 bitops_1.0-6 BiocInstaller_1.18.2
[5] Biobase_2.28.0 BiocGenerics_0.14.0
loaded via a namespace (and not attached):
[1] tools_3.2.0 XML_3.98-1.1
This works for me. Again, the error message probably means that the file was not successfully downloaded. I need to add some better checking on these errors, but here is what I get:
> gse = getGEO('GSE1739', GSEMatrix=TRUE)
ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE1nnn/GSE1739/matrix/
Found 1 file(s)
GSE1739_series_matrix.txt.gz
trying URL 'ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE1nnn/GSE1739/matrix/GSE1739_series_matrix.txt.gz'
ftp data connection made, file length 309166 bytes
opened URL
==================================================
downloaded 301 KB
....
Does your output (before the error message) show that the file (approximate size, 301 KB) was downloaded? If not, then, perhaps try again later or double-check that you can connect to the NCBI ftp server correctly.
Log in to answer this question.
This works for me. Can you access this via web browser?
Edit: As suggested on SO try
GSEMatrix = FALSEDear Pgibas, It works with (with some warnings)
GSEMatrix = F. But when I rungetGEOSuppFiles("GSE27447"). It throws an errorHow this can be handled? Is there any significant difference between setting
GSEMatrixequal toTRUEorFALSE?This is again likely the same connection problem as you noted in your original post. You will likely want to use
GSEMatrix=TRUE, but you can check the GEOquery vignette for details. Yes, there is a significant difference betweenGSEMatrix=FALSEandGSEMatrix=TRUE. You will likely want to useGSEMatrix=TRUE, but you can check the GEOquery vignette for details.Worked for me too, double check your connection
Hi can any one please tell me how to install GEOquery packages on windows. It is showing an error XML file and RCURL file is not installed. Then I tried to install XML it is again showing error
Please elaborate the exact error and versions of R and packages.
Please ask a new question adding a new post (link "New post" in the top-right side of your browser, or alternatively click here). Posting here is meant for adding answers to the current question (first post above).