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'
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 snakemakeIn 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.