To avoid duplication of effort, and perhaps to attract some early reviewers, I 
figure I’d let this group know that I plan to submit a new package “IGV” for 
inclusion in the next Bioconductor release.

The package will provide an interface to the excellent and quite new 
browser-based genome viewer written by Jim Robison and colleagues, igv.js:

IGV depends upon RStudio’s httpuv websocket library for passing JSON messages 
between an R session and igv.js running in the browser.  Communication goes 
both ways - both ends are fully and independently interactive.  

My goal with IGV is to support all of the tracks mentioned here

Note that though igv.js typically gets its track data from CORS/indexed 
webservers, the IGV package will also support locally created R data.frames 
describing either bed or wig tracks - annotation and quantitative, respectively 
- without any need to host those tracks on a pre-existing webserver.  httpuv 
includes a minimal webserver which can adequately serve the temporary files IGV 
creates from your data.frames.

In the years since the first appearance of my RCyjs package (which has a 
similarly design, and the same base class, using websockets to communicate 
between R and the browser), RStudio and Hector Corrado Bravo have added async 
web socket support for Windows to httpuv.  This means IGV (and RCyjs also) will 
run on all platforms.  A refactored BrowserViz package (which might be useful 
to anyone wishing to do similar R-to-browser communication) will accompany my 

For javascript development, I have adopted commonly used strategies and tools, 
using npm and webpack to build a single, all-libraries-included html/js/css 
file for loading into the browser.  This allows us to control library 
versioning and to improve browser load times.  The single combined html/js/css 
file is created, not as part of R CMD build, but with a prior and separate, 
developer-only makefile maintained in the package’s inst/browserCode directory. 
 Only that combined html/js/css file is included in the package tarball, along 
with configuration files to rebuild it, but not including all of the usually 
large number of node_modules that contributed to its construction.

Comments and suggestions welcome.

 - Paul
_______________________________________________ mailing list

Reply via email to