This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to fix error in getGEO function in rstudio?

I am new in R. I am using 3.6.1 version of R on 64-bit system with Windows 7. In RStudio, when I attempt to run the getGEO command,

> library(Biobase)
> library(GEOquery)
> library(limma)
> gset <- getGEO("GSE41313", GSEMatrix =TRUE, AnnotGPL=TRUE)

I get the following error message

Found 1 file(s)
GSE41313_series_matrix.txt.gz
trying URL 'https://ftp.ncbi.nlm.nih.gov/geo/series/GSE41nnn/GSE41313/matrix/GSE41313_series_matrix.txt.gz'
Error in download.file(sprintf("https://ftp.ncbi.nlm.nih.gov/geo/series/%s/%s/matrix/%s",  : 
  cannot open URL 'https://ftp.ncbi.nlm.nih.gov/geo/series/GSE41nnn/GSE41313/matrix/GSE41313_series_matrix.txt.gz'
In addition: Warning message:
In download.file(sprintf("https://ftp.ncbi.nlm.nih.gov/geo/series/%s/%s/matrix/%s",  :
  InternetOpenUrl failed: 'A connection with the server could not be established'
>
r getgeo geoquery microarray data

Have you been able to download data this way before? It is possible that your local firewall may be preventing this download since direct URL to download data is working.

I'm downloading this data for the first time . my windows firewall and antivirus is off.

I have no problem downloading packages. So I don't think it's an internet connection problem.

> install.packages("pheatmap")

Installing package into ‘C:/Users/ZST/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.6/pheatmap_1.0.12.zip'
Content type 'application/zip' length 78643 bytes (76 KB)
downloaded 76 KB

package ‘pheatmap’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\ZST\AppData\Local\Temp\RtmpSMzrTc\downloaded_packages
>

Are you able to use the URL I linked in the comment above (click on the bold link) and does that prompt you to save the file? If you have a firewall protecting your institution/site it may be preventing the download.

yes. I can download by this URL.

I think that there is something specific at your side that is causing the error. I can download the data:

gset <- getGEO("GSE41313", GSEMatrix =TRUE, AnnotGPL=TRUE)[[1]]
Found 1 file(s)
GSE41313_series_matrix.txt.gz
tentando a URL 'https://ftp.ncbi.nlm.nih.gov/geo/series/GSE41nnn/GSE41313/matrix/GSE41313_series_matrix.txt.gz'
Content type 'application/x-gzip' length 32464737 bytes (31.0 MB)
==================================================
downloaded 31.0 MB

Parsed with column specification:
cols(
  .default = col_double(),
  ID_REF = col_character()
)
See spec(...) for full column specifications.
|=================================================================| 100%   71 MB
File stored at: 
/tmp/Rtmp2KzxPN/GPL13158.annot.gz
Warning: 102 parsing failures.
  row             col           expected    actual         file
54614 Platform_SPOTID 1/0/T/F/TRUE/FALSE --Control literal data
54615 Platform_SPOTID 1/0/T/F/TRUE/FALSE --Control literal data
54616 Platform_SPOTID 1/0/T/F/TRUE/FALSE --Control literal data
54617 Platform_SPOTID 1/0/T/F/TRUE/FALSE --Control literal data
54618 Platform_SPOTID 1/0/T/F/TRUE/FALSE --Control literal data
..... ............... .................. ......... ............
See problems(...) for more details.

There are parsing warnings, but these are noted in the GEO record (I believe), with code provided to correct them. If you go HERE, then click on the Analyze with GEO2R blue button, and then the R script tab, you will see code to use.

Thanks for your answers, I try to solve the problem.

0 answers

No answers yet.

Log in to answer this question.