ggjs | R Documentation |
Deploys a gGnome.js by downloaded the js / node source code from mskilab.com and then dumping json / csv files corresponding to the graph and coverage data.
Easiest way is to use pairs= argument which is a data.table with columns $pair, $jabba_rds, $cov_rds, $headline, $description where $headline is a character vector of the headline that will be displayed in the search bar and $description is the information that will be shown when the graph is loaded.
Takes gGraph objects or lists whose first item (or $graph) item is a gGraph, second optional item (or $cov) is a GRanges of coverage (where coverage data is specified by argument "field")
If arguments are named then these will be the name of the resulting object in the deployed gGnome.js app, otherwise they will be given default names (ie graph1, graph 2).
Dumps the app to a directory where to which user can navigate and deploy the app (instructions provided at runtime), default path is public_html/ggjs
Note: coverage should be less than 1e6 bins per file, if binsize is not NULL (default = 5000) then coverage data will be aggregated prior to dumping.
example argument: ggjs(path = gg, graph2 = list(gg2, cov2), list(cov = cov3, graph = gg3))
ggjs(
...,
pairs = NULL,
field = "ratio",
path = "~/public_html/ggjs",
binwidth = 5000,
mc.cores = 1,
web = TRUE,
skip.dl = FALSE,
clean.up = TRUE,
force = FALSE,
win = NULL,
ggjs.url = "http://mskilab.com/gGnome.js/ggjs.tar.gz",
verbose = TRUE
)
... |
gGnome objects of list |
pairs |
data.table with $pair, $jabba_rds, $cov_rds field to dump, can have optional fields $headline and $description |
field |
field of coverage GRanges that will be used to dump out the coverage data, default "ratio" |
path |
path to dump app to, this will also be the command that will be run to deloy the app ~/public_html/ggjs |
web |
whether to dump web version which will update datafiles.csv and dump files to json and coverage subfolders of path (FALSE) |
binsize |
binsize to aggregate coverage (default 5000) |
skip.download |
skip download (useful if dumping files to existing directory) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.