Panel configuration tuned to the specific properties of
TreeSummarizedExperiment
.
iSEE(
se,
initial = NULL,
extra = NULL,
colormap = ExperimentColorMap(),
landingPage = createLandingPage(),
tour = NULL,
appTitle = NULL,
runLocal = TRUE,
voice = FALSE,
bugs = FALSE,
saveState = NULL,
...
)
A SummarizedExperiment object, ideally with named assays.
If missing, an app is launched with a landing page generated by the landingPage
argument.
A list of Panel objects specifying the initial state of the app. The order of panels determines the sequence in which they are laid out in the interface. Defaults to one instance of each panel class available from iSEE.
A list of additional Panel objects that might be added after the app has started. Defaults to one instance of each panel class available from iSEE.
An ExperimentColorMap object that defines custom colormaps to apply to individual assays
, colData
and rowData
covariates.
A function that renders a landing page when iSEE
is started without any specified se
.
Ignored if se
is supplied.
A data.frame with the content of the interactive tour to be displayed after starting up the app.
Ignored if se
is not supplied.
A string indicating the title to be displayed in the app.
If not provided, the app displays the version info of iSEE
.
A logical indicating whether the app is to be run locally or remotely on a server, which determines how documentation will be accessed.
A logical indicating whether the voice recognition should be enabled.
Set to TRUE
to enable the bugs Easter egg.
Alternatively, a named numeric vector control the respective number of each bug type (e.g., c(bugs=3L, spiders=1L)
).
A function that accepts a single argument containing the current application state and saves it to some appropriate location.
Further arguments to pass to shinyApp
.
The iSEE method for the TreeSE container returns a default set of panels typically relevant for microbiome data. This configuration can be modified by defining a different set of initial panels. By default, the interface includes the following panels:
Configuring the initial state of the app is as easy as passing a list of Panel objects to initial
.
Each element represents one panel and is typically constructed with a command like ReducedDimensionPlot()
.
Panels are filled from left to right in a row-wise manner depending on the available width.
Each panel can be easily customized by modifying the parameters in each object.
The extra
argument should specify Panel classes that might not be shown during initialization
but can be added interactively by the user after the app has started.
The first instance of each new class in extra
will be used as a template when the user adds a new panel of that class.
Note that initial
will automatically be appended to extra
to form the final set of available panels,
so it is not strictly necessary to re-specify instances of those initial panels in extra
.
(unless we want the parameters of newly created panels to be different from those at initialization).
The tour
argument allows users to specify a custom tour to walk their audience through various panels.
This is useful for describing different aspects of the dataset and highlighting interesting points in an interactive manner.
We use the format expected by the rintrojs
package - see https://github.com/carlganz/rintrojs#usage for more information.
There should be two columns, element
and intro
, with the former describing the element to highlight and the latter providing some descriptive text.
The defaultTour
also provides the default tour that is used in the Examples below.
If se
is not supplied, a landing page is generated that allows users to upload their own RDS file to initialize the app.
By default, the maximum request size for file uploads defaults to 5MB
(https://shiny.rstudio.com/reference/shiny/0.14/shiny-options.html).
To raise the limit (e.g., 50MB), run options(shiny.maxRequestSize=50*1024^2)
.
The landingPage
argument can be used to alter the landing page, see createLandingPage
for more details.
This is useful for creating front-ends that can retrieve SummarizedExperiments from a database on demand for interactive visualization.
If users want to record the application state, they can download an RDS file containing a list with the entries:
memory
, a list of Panel objects containing the current state of the application.
This can be directly re-used as the initial
argument in a subsequent iSEE
call.
se
, the SummarizedExperiment object of interest.
This is optional and may not be present in the list, depending on the user specifications.
colormap
, the ExperimentColorMap object being used.
This is optional and may not be present in the list, depending on the user specifications.
We can also provide a custom function in saveState
that accepts a single argument containing this list.
This is most useful when iSEE
is deployed in an enterprise environment where sessions can be saved in a persistent location;
combined with a suitable landingPage
specification, this allows users to easily reload sessions of interest.
The idea is very similar to Shiny bookmarks but is more customizable and can be used in conjunction with URL-based bookmarking.
# Import TreeSE
library(mia)
data("GlobalPatterns", package = "mia")
tse <- GlobalPatterns
# Agglomerate TreeSE by Genus
tse_genus <- agglomerateByRank(tse,
rank = "Genus",
onRankOnly = TRUE)
# Add relabundance assay
tse_genus <- transformAssay(tse_genus, method = "relabundance")
# Launch iSEE with custom initial panels
if (interactive()) {
iSEE(tse_genus, initial = c(RowTreePlot(), AbundancePlot(), AbundanceDensityPlot()))
}