Contents

The epivizrData packages includes methods supporting serving data for visualization applications of data from R/Bioconductor objects. It is primarily used to serve data from interactive R/Bioconductor sessions to the epiviz JS application http://epiviz.github.io. These functions have been extracted from the epivizr into its own package for easier use and maintenance.

It is designed to receive and send requests through WebSocket connections provided by the epivizrServer.

0.0.1 Usage

The general pattern to use this package is to create an EpivizDataMgr object using the createMgr function. Once the manager is created, data objects, which provide measurements to a visualization application can be added using the add_measurements method.

library(epivizrData)
library(GenomicRanges)

server <- epivizrServer::createServer(port=7123L)
data_mgr <- epivizrData::createMgr(server)

## add measurements from a GRanges object
gr <- GRanges("chr10", IRanges(start=1:1000, width=100), score=rnorm(1000))
data_mgr$add_measurements(gr, "example_gr", type="bp", columns="score")
## EpivizBpData object example_gr_1 
## GNCList object with 1000 ranges and 1 metadata column:
##          seqnames    ranges strand |               score
##             <Rle> <IRanges>  <Rle> |           <numeric>
##      [1]    chr10     1-100      * |   -0.76924123895651
##      [2]    chr10     2-101      * | -0.0701138273585522
##      [3]    chr10     3-102      * |  -0.677786250297033
##      [4]    chr10     4-103      * |  -0.275679022923093
##      [5]    chr10     5-104      * |   -1.89025717223779
##      ...      ...       ...    ... .                 ...
##    [996]    chr10  996-1095      * |   0.940354311088085
##    [997]    chr10  997-1096      * |   -1.35956007150519
##    [998]    chr10  998-1097      * |   -1.17229848037875
##    [999]    chr10  999-1098      * |  -0.269007477820343
##   [1000]    chr10 1000-1099      * |    2.16366654777031
##   -------
##   seqinfo: 1 sequence from an unspecified genome; no seqlengths
## 
##  columns: score 
##  limits:
##      [,1]
## [1,]   -3
## [2,]    4

See ?epivizrData::register for supported object types and options when adding data. For details on usage within the epiviz visualization app see the epivizr package vignette.