GEOquery download options
1
1
Entering edit mode
8.2 years ago
russhh 5.7k

In R, I'm using GEOquery to download microarray datasets and am trying to work out a way to suppress the messages that the getGEO function always writes to the screen:

> gse <- getGEO('GSE31365')
ftp://ftp.ncbi.......
Found 1 file(s)
GSE31365_....
trying URL ;ftp://......
==============......

. None of the usual suspects can suppress these messages: capture.output, suppressWarnings, suppressMessages in R itself, this isn't an issue; but I'm calling an R script within a snakemake run: R(....) block, and I get page after page of the following:

|======================= | 100% ~0 s remaining

So, I was wondering a) how I can suppress the download messages from GEOquery; or b) how to suppress R messages from bubbling up into snakemake; and c) does anyone know what the available values are for the GEOquery option 'download.file.method.GEOquery'

R bioconductor GEOquery • 2.9k views
ADD COMMENT
0
Entering edit mode

This seems to relate to the snakemake/rpy2 connection to R. in R, interactive() returns TRUE if you're working in R, and FALSE if you call Rscript. Curiously, interactive() == TRUE when R(...) is called inside snakemake

ADD REPLY
0
Entering edit mode

In fact this had nothing to do with GEOquery and resulted from my using dplyr::do(), a function that prints out a progress_bar, within one of my GEOquery-related functions.

FYI: The dplyr progress bar can be suppressed with options('dplyr.show_progress' = FALSE).; and is suppressed in a knitr-run or a non-interactive run.

ADD REPLY
1
Entering edit mode
8.2 years ago
ddiez ★ 2.0k

Indeed, some messages from getGEO (like those coming from getGEOfile which getGEO calls) are suppressed by supressMessages, but not those coming from download.file, which has an argument (quiet) that needs to be set in order to suppress feedback.

download.file.method.GEOquery is by default set to auto, which according to the help page for download.file will select libcurl because the URL is https. I think any of the options listed in ?download.file can be tried with download.file.method.GEOquery but they may not work if the URL is https (tested it with "internal" and failed).

ADD COMMENT

Login before adding your answer.

Traffic: 2210 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6