Question: GEOquery download options
1
gravatar for russhh
2.4 years ago by
russhh4.2k
UK, U. Glasgow
russhh4.2k wrote:

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'

geoquery bioconductor R • 914 views
ADD COMMENTlink modified 2.4 years ago by ddiez1.7k • written 2.4 years ago by russhh4.2k

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 REPLYlink written 2.4 years ago by russhh4.2k

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 REPLYlink written 2.4 years ago by russhh4.2k
1
gravatar for ddiez
2.4 years ago by
ddiez1.7k
Japan
ddiez1.7k wrote:

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 COMMENTlink written 2.4 years ago by ddiez1.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1155 users visited in the last hour