Compiled date: 2022-04-26
Last edited: 2020-04-20
License: MIT + file LICENSE
The default start configuration with one plot of each type may not always be the most appropriate.
iSEE allows the user to programmatically modify the initial settings (Rue-Albrecht et al. 2018), avoiding the need to click through the choices to obtain the desired panel setup.
Almost every aspect of the initial app state can be customized, down to whether or not the parameter boxes are open or closed!
To demonstrate this feature, let’s assume that we are only interested in feature assay plot panels.
The default set of panels can be changed via the initialPanels argument of the iSEE function call.
Given a SingleCellExperiment or SummarizedExperiment object named sce1 We’ll re-use the example from the previous workflow., the following code opens an app with two adjacent feature assay plots.
Note that each panel is set to occupy half the width of the application window, which is set to 12 units by the shiny package.
library(iSEE)
app <- iSEE(sce, initial=list(
FeatureAssayPlot(PanelWidth=6L),
FeatureAssayPlot(PanelWidth=6L)
))
The genes to show on the Y-axis in the two plots can be specified via the YAxisFeatureName argument to the respective panels in iSEE.
app <- iSEE(sce, initial=list(
FeatureAssayPlot(YAxisFeatureName="0610009L18Rik"),
FeatureAssayPlot(YAxisFeatureName="0610009B22Rik")
))
This will open the app with two feature assay plots, showing the selected genes. Of course, from this starting point, all the interactive functionality is still available, and new panels can be added, modified and linked via point selection.
The data parameters control the source of the information represented on the X-axis and Y-axis of each plot. Those parameters are accessible at runtime in the eponymous collapsible box.
We refer users to the individual help page of each panel type listed below to learn more about the choices of X-axis variables for each type of panel.
From a running iSEE application, you can also display all the R code that is required to set up the current configuration by clicking on Display panel settings under the export icon in the top-right corner.
The nature of the Y-axis is defined by the type of panel.
For instance, column data plot panels require the name of a column in the colData(sce).
Users can preconfigure the Y-axis of individual column data plot panels as follows:
app <- iSEE(sce, initial=list(
ColumnDataPlot(YAxis="NREADS", PanelWidth=6L, DataBoxOpen=TRUE),
ColumnDataPlot(YAxis="TOTAL_DUP", PanelWidth=6L, DataBoxOpen=TRUE)
))
The X-axis can be set to different types of variables.
The type of variable is generally set in the XAxis slot, while the name of the variable is stored in a different slot depending on the value of XAxis.
At runtime, this allows the app to remember the last selected variable of each type.
For instance, the XAxis slot of the feature assay plot can have up to four different values:
"None": does not require any addition input (draws a single violin for all features)."Column data": requires XAxisColumnData to be set to a column name in the colData(sce)."Feature name": requires either
XAxisFeatureName to be set to a feature name (or positional index) in rownames(sce).XAxisFeatureSource to be set to the name of a Row data table panel with an active selection set in its own Selected column.Each of these scenarios is demonstrated below:
fex <- FeatureAssayPlot(DataBoxOpen=TRUE, PanelWidth=6L)
# Example 1
fex1 <- fex
fex1[["XAxis"]] <- "None"
# Example 2
fex2 <- fex
fex2[["XAxis"]] <- "Column data"
fex2[["XAxisColumnData"]] <- "Core.Type"
# Example 3a
fex3 <- fex
fex3[["XAxis"]] <- "Feature name"
fex3[["XAxisFeatureName"]] <- "Zyx"
# Example 4 (also requires a row statistic table)
fex4 <- fex
fex4[["XAxis"]] <- "Feature name"
fex4[["XAxisFeatureSource"]] <- "RowDataTable1"
rex <- RowDataTable(Selected="Ints2", Search="Ints", PanelWidth=12L)
# Initialisation
app <- iSEE(sce, initial=list(fex1, fex2, fex3, fex4, rex))
Note how Example 3b requires an active row data table as a source of selection.
To facilitate visualisation, we added the features identifiers as the gene_id column in rowData(sce),
we preselected the feature "Ints2", and we prefiltered the table using the pattern "Ints" on the gene_id column to show this active selection.
In the case of reduced dimension plots, data parameters include the name of the reduced dimension slot from which to fetch coordinates.
This information is stored in the Type slot:
app <- iSEE(sce, initial=list(
ReducedDimensionPlot(DataBoxOpen=TRUE, Type="TSNE",
XAxis=2L, YAxis=1L, PanelWidth=6L)
))
For axes linked to an assay, such as the Y-axis of feature assay plot panels, the assay to display can be set through the Assay argument:
app <- iSEE(sce, initial=list(
FeatureAssayPlot(DataBoxOpen=TRUE, Assay="logcounts", PanelWidth=6L),
FeatureAssayPlot(DataBoxOpen=TRUE, Assay="tophat_counts", PanelWidth=6L)
))