ServeGrandR {grandR} | R Documentation |
Serve a shiny web interface
Description
Fire up a shiny web server for exploratory analysis of grandR data.
Usage
ServeGrandR(
data,
table = NULL,
sizes = NA,
height = 400,
plot.gene = NULL,
plot.global = NULL,
plot.window = NULL,
highlight = NULL,
df.identifier = "Symbol",
title = Title(data),
show.sessionInfo = FALSE,
help = list(".Q: multiple testing corrected p values", ".LFC: log2 fold changes")
)
Arguments
data |
the grandR object (or a file name to an rds file containing a grandR object) |
table |
the table to display (can be NULL or a named list; see details) |
sizes |
the widths for the gene plots to show (12 is full screen with); must be a vector as long as there are gene plots |
height |
the height for the gene plots in pixel |
plot.gene |
a list of gene plots; can be NULL, then the stored gene plots are used (see Plots) |
plot.global |
a list of global plots; can be NULL, then the stored global plots are used (see Plots) |
plot.window |
a list of static plots to show in a floating window; see details |
highlight |
a vector of gene names that are highlighted in the beginning |
df.identifier |
the main identifier (column name) from the table; this is used when calling the gene plot functions; |
title |
the title to show in the header of the website |
show.sessionInfo |
whether to show session info |
help |
a list of characters that is shown as help text at the beginning (when no gene plot is shown); should describe the contents of your table |
Details
If the table parameter is NULL, either an analysis table named "ServeGrandR" is used (if it exists), otherwise the columns "Q", "LFC", "Synthesis" and "Half-life" of all analysis tables are used. If it is a list, a menu is created in the navbar
plot.window must be a list of plotting functions that receive the grandR object and return a plot. It can also be a list of list, in which case more than one plotting windows are generated. Each plot will be rendered with a size of 350x350.
The gene plots must be functions that accept two parameters: the grandR object and a gene identifier. You can either use
functions directly (e.g. plot.gene=list(PlotGeneOldVsNew)
), or use Defer in cases you need to specify additional parameters,
e.g. plot.gene=list(Defer(PlotGeneOldVsNew,log=FALSE))
. The global plots are functions accepting a single parameter (the grandR object). Here
the use of Defer is encouraged due to its caching mechanism.
Value
a shiny web server
Examples
## Not run:
sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
design=c("Condition",Design$dur.4sU,Design$Replicate))
sars <- Normalize(sars)
sars <- Pairwise(sars,contrasts = GetContrasts(sars,contrast = c("Condition","SARS","Mock")))
sars <- AddGenePlot(sars,"timecourse",
Defer(PlotGeneProgressiveTimecourse,steady.state=c(Mock=TRUE,SARS=FALSE)))
sars <- AddGlobalPlot(sars,"Vulcano",VulcanoPlot)
ServeGrandR(sars)
## End(Not run)