generateTrelliscopeJS: Generate javascript trelliscope display

Description Usage Arguments


This function makes a trelliscope display using some standard plotting options. We pass the plotCOls, which is a list of plot parameters, that gets used to make a plot for every type of plot given by plotTypes. The javascript output comes with pre-rendered plots, which makes the output file size pretty hefty (think of 100's of MBs). The alternative is a shiny app output, which works for data scientists but the output is much less responsive to the point where it becomes a nuisance. I would recommend going for the javascript output (this function), despite the computation time. It's worth it:)


generateTrelliscopeJS(assays, plotCols = list(x = "RelTime", y = "Value",
  color = "Condition", fill = NULL, group = NULL, facet1 = NULL, facet2 = NULL),
  plotTypes = c("box", "scatter", "line", "smooth"), splitCols = c("Assay",
  "Variable"), group = "Studies", baseName = "", path = NULL,
  preview = FALSE)



Assay data for a given study (dbValues$assays if data loaded from PhenoDb dashboard .rds output)


Plot settings in a named list passed to mapBasePlot(). USe formals(mapBasePlot)$plotCols for an example


Character vector of plot types. Accepts "box", "scatter", "line" or "smooth"


Columns to subset the data by, defaults to c("Assay", "Variable").


Trelliscope group name used to group together multiple related displays. Set this to the study code!


Base name of the output display if you are making multiple plots of the same data with different plotCols


Path to javascript output. Default to 'vdb_js' - leaving it empty or "" will write the output to a temporary folder.


If not NULL then this can be an integer value indicating the number of plots to sample for a preview! (e.g. something around ~20)

#' @details This function wraps 4 steps. 1. Nesting the data, split by splitCols 2. Making plots for every nested subset and every type in plotTypes 3. Adding 'cogs'/summary for every nested subset (mean, SD, etc...) 4. Make trelliscope display with javascript/html output! I estimate about 1minute for every 100 plots.

Lodewic/accomodation-recommendation documentation built on Oct. 27, 2018, 12:12 a.m.