10 GEOquery包的getGEO函数无法下载 无法与服务器建立连接

具体报错如下:

gset = getGEO(GSE, GSEMatrix =TRUE, AnnotGPL=TRUE,destdir=workdir)
Found 1 file(s)
GSE2685_series_matrix.txt.gz
trying URL 'https://ftp.ncbi.nlm.nih.gov/geo/series/GSE2nnn/GSE2685/matrix/GSE2685_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/GSE2nnn/GSE2685/matrix/GSE2685_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: '无法与服务器建立连接'
请先 登录 后评论

1 个回答

omicsgene - 生物信息
擅长:重测序,遗传进化,转录组,GWAS

通常只有的网络错误,都很诡异,毕竟长城在这里。

解决方式也简单,加上代码: options( 'download.file.method.GEOquery' = 'libcurl' ) 即可!

再次运行后如下:


> options( 'download.file.method.GEOquery' = 'libcurl' )
> ###获取数据
> gset = getGEO(GSE, GSEMatrix =TRUE, AnnotGPL=TRUE,destdir=workdir)
Found 1 file(s)
GSE2685_series_matrix.txt.gz
trying URL 'https://ftp.ncbi.nlm.nih.gov/geo/series/GSE2nnn/GSE2685/matrix/GSE2685_series_matrix.txt.gz'
Content length 430148 bytes (420 KB)
downloaded 420 KB
Parsed with column specification:
cols(
  .default = col_double(),
  ID_REF = col_character()
)
See spec(...) for full column specifications.
File stored at: 
D:/GEO/GPL80.annot.gz
请先 登录 后评论
  • 1 关注
  • 0 收藏,6649 浏览
  • 提出于 2019-11-11 16:41