[Bioc-devel] BrowserViz: curious but needs a small tweak to run example

Leonardo Collado Torres lcollado at jhu.edu
Fri Apr 3 22:56:25 CEST 2015


Forgot to add bioc-devel

On Fri, Apr 3, 2015 at 4:55 PM, Leonardo Collado Torres
<lcollado at jhu.edu> wrote:
> Hi,
>
> From the April newsletter I got curious about BrowserViz but I
> couldn't run the simple example as-is. From
> http://bioconductor.org/checkResults/devel/bioc-LATEST/BrowserViz/ I
> can see that version 0.99.26 is passing all the checks in Linux/Mac OS
> X but I got errors as shown below.
>
>>  library(BrowserViz)
> Loading required package: httpuv
> Loading required package: jsonlite
>
> Attaching package: ‘jsonlite’
>
> The following object is masked from ‘package:utils’:
>
>     View
>
>
> Attaching package: ‘BrowserViz’
>
> The following object is masked from ‘package:jsonlite’:
>
>     toJSON
>
>>
>>   bv <- BrowserViz(4000:4024)
> Error: file.exists(browserFile) is not TRUE
>> traceback()
> 3: stop(sprintf(ngettext(length(r), "%s is not TRUE", "%s are not all TRUE"),
>        ch), call. = FALSE, domain = NA)
> 2: stopifnot(file.exists(browserFile))
> 1: BrowserViz(4000:4024)
>> devtools::session_info()
> Session info------------------------------------------------------------------------------------------------------------------------
>  setting  value
>  version  R Under development (unstable) (2014-11-01 r66923)
>  system   x86_64, darwin10.8.0
>  ui       AQUA
>  language (EN)
>  collate  en_US.UTF-8
>  tz       America/New_York
>
> Packages----------------------------------------------------------------------------------------------------------------------------
>  package      * version date       source
>  BiocGenerics   0.13.11 2015-04-03 Bioconductor
>  BrowserViz   * 0.99.26 2015-04-01 Bioconductor
>  devtools       1.6.1   2014-10-07 CRAN (R 3.2.0)
>  httpuv       * 1.3.2   2014-10-23 CRAN (R 3.2.0)
>  jsonlite     * 0.9.13  2014-10-21 CRAN (R 3.2.0)
>  Rcpp           0.11.5  2015-03-06 CRAN (R 3.2.0)
>  rstudioapi     0.2     2014-12-31 CRAN (R 3.2.0)
>
>
> I can see that BrowserViz() by default uses browserFile = NA.
>
>> args(BrowserViz)
> function (portRange, host = "localhost", title = "BrowserViz",
>     quiet = TRUE, browserFile = NA)
> NULL
>>
>
> The man page states: "defaults to NA, which is interpreted as an
> instruction to use viz.html in the inst directory of this package".
>
> Looking at the code I noticed that BrowserViz() starts with:
>
> if (is.na(browserFile))
>         browserFile <- browserVizBrowserFile
>
> which is not working. However with
>
>> system.file('scripts', 'viz.html', package = 'BrowserViz')
> [1] "/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BrowserViz/scripts/viz.html"
>
> I can get it to work. See:
>
>> f <- system.file('scripts', 'viz.html', package = 'BrowserViz')
>> bv <- BrowserViz(4000:4024, browserFile = f)
>
>
> Cheers,
> Leo



More information about the Bioc-devel mailing list