"quiet" mode for AnnotationHub?
2
0
Entering edit mode
@robert-k-bradley-5997
Last seen 8 months ago
United States

Hello,

I'm wondering whether there is a "quiet" mode for AnnotationHub, in which it would only print serious warnings or errors. Currently it displays snapshot and cache information whenever accessed. An example follows.

I'm interested in such a "quiet" mode because I regularly access AnnotationHub objects over and over within a pipeline, and so my logging information becomes clogged with these messages.

Thank you,

Rob

> hub = AnnotationHub()
snapshotDate(): 2016-10-11

> dna = hub[["AH134"]]
require(“Rsamtools”)
loading from cache ‘/Users/rbradley//.AnnotationHub/134’
    ‘/Users/rbradley//.AnnotationHub/14095’

> getOption ("verbose")
[1] FALSE

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.2

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    parallel  grDevices utils     datasets  stats     graphics  methods   base     

other attached packages:
[1] Rsamtools_1.26.1     Biostrings_2.42.1    XVector_0.14.0       GenomicRanges_1.26.1 GenomeInfoDb_1.10.1  IRanges_2.8.1        S4Vectors_0.12.1     AnnotationHub_2.6.4
[9] BiocGenerics_0.20.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.8                   AnnotationDbi_1.36.0          zlibbioc_1.20.0               BiocParallel_1.8.1            xtable_1.8-2                 
 [6] R6_2.2.0                      httr_1.2.1                    tools_3.3.2                   Biobase_2.34.0                DBI_0.5-1                    
[11] htmltools_0.3.5               yaml_2.1.14                   digest_0.6.10                 interactiveDisplayBase_1.12.0 shiny_0.14.2                 
[16] bitops_1.0-6                  curl_2.3                      memoise_1.0.0                 RSQLite_1.1-1                 mime_0.5                     
[21] compiler_3.3.2                BiocInstaller_1.24.0          httpuv_1.3.3                 
AnnotationHub • 1.4k views
ADD COMMENT
0
Entering edit mode
@schifferl
Last seen 7 months ago
New York, NY

If you were to put your AnnotationHub calls inside an invisible that would hide the messages. For example,

invisible(AnnotationHub())
ADD COMMENT
0
Entering edit mode

Additionally, there is another function to remove messages from output:

suppressMessages(AnnotationHub()[["AH134"]])
ADD REPLY
0
Entering edit mode
@robert-k-bradley-5997
Last seen 8 months ago
United States

Thank you for the quick response. invisible doesn't seem to accomplish what I want, but suppressMessages does. Thanks for the simple fix suggestion.

Best,

Rob

ADD COMMENT

Login before adding your answer.

Traffic: 1041 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