Compiled date: r Sys.Date()

Last edited: 2020-04-20

License: r packageDescription("iSEE")[["License"]]

    collapse = TRUE,
    comment = "#>",
    error = FALSE,
    warning = FALSE,
    message = FALSE,
    crop = NULL
sce <- readRDS("sce.rds")
SCREENSHOT <- function(x, ...) knitr::include_graphics(x)
knitr::include_graphics(path = system.file(package="iSEE", "www/iSEE.png", mustWork=TRUE))


One of r Biocpkg("iSEE")'s main features is the ability to share information between panels. This facilitates deeper exploration of a dataset by allowing users to visualize relationships across multiple metrics. iSEE() currently supports three modes of information sharing between panels - multiple selections, single selections and dynamic selections - which are demonstrated in this vignette using the Allen dataset processed in the r Biocpkg("iSEE", "basic.html", "previous vignette").

Multiple selections

Basic use

As its name suggests, this involves selecting multiple features or samples in one panel and transmitting their identities to another panel to affect the visualization. To demonstrate, we will create a small app involving a single reduced dimension plot and a column metadata plot.

app <- iSEE(sce, initial=list(

We indicate that we want one panel to "receive" a multiple selection from another panel. This is done by specifying the selection source (for samples/columns in this case, given the nature of the two panels) and indicating that the column data plot is to receive a selection from the reduced dimension plot.

rdp <- ReducedDimensionPlot()
cdp <- ColumnDataPlot(
    XAxis="Column data",

app <- iSEE(sce, initial=list(rdp, cdp))

We can click-and-drag to select multiple points in the reduced dimension plot with a brush, which highlights those same points in the column data plot. This enables users to easily explore relationships between different visualizations in the iSEE() interface.

brush <- list(xmin = -45.943219326064, xmax = -0.9320051164658, ymin = -70.389479254644, ymax = -5.1362394173266,
    coords_css = list(xmin = 51.009614944458, xmax = 219.009614944458, ymin = 233.009613037109,
        ymax = 463.856708268114), coords_img = list(xmin = 66.3132158276913, xmax = 284.715575288405,
        ymin = 302.912485837478, ymax = 603.013698630137), img_css_ratio = list(x = 1.30001404440901,
        y = 1.29999995231628), mapping = list(x = "X", y = "Y"), domain = list(left = -49.1019902822795,
        right = 57.2288623709446, bottom = -70.389479254644, top = 53.5190834641121),
    range = list(left = 50.986301369863, right = 566.922374429224, bottom = 603.013698630137,
        top = 33.1552511415525), log = list(x = NULL, y = NULL), direction = "xy",
    brushId = "ReducedDimensionPlot1_Brush", outputId = "ReducedDimensionPlot1")

rdp <- ReducedDimensionPlot(BrushData=brush)
app <- iSEE(sce, initial=list(rdp, cdp))

Alternatively, a single click will lay down lasso waypoints for a non-rectangular selection. Once closed, the points in the lasso will be transmitted to the column data plot.

lasso <- list(lasso = NULL, closed = TRUE, panelvar1 = NULL, panelvar2 = NULL, mapping = list(
        x = "X", y = "Y"), coord = structure(c(24.7886887175902, 24.7886887175902, 43.0075135167132, 
    53.1886214926936, 53.4565453867984, 53.7244692809032, 39.2565789992467, 23.4490692470664, 
    24.7886887175902, -8.24559471370669, -26.3363891653729, -39.0564790142006, -45.5578582702682, 
    -23.5097025323, -3.44022743748286, 15.7812416674124, -0.896209467717313, -8.24559471370669
    ), .Dim = c(9L, 2L)))

app <- iSEE(sce, initial=list(ReducedDimensionPlot(BrushData=lasso), cdp))

Selection effects

Transparency is the default aesthetic effect used to distinguish points in multiple selections in receiving plots. Alternatively, we may use color:

cdp2 <- cdp
cdp2[["SelectionEffect"]] <- "Color"
app <- iSEE(sce, initial=list(rdp, cdp2))

Another option is to restrict the receiving plot so that it only shows the points in the multiple selection. This effectively "gates" the dataset on the selection in the reduced dimension plot, analogous to identification populations of interest in flow cytometry studies. Indeed, this gating process can be repeated as many times as desired; a multiple selection could made on the column data plot and transmitted to another panel, and so on. (See this mass cytometry tour for an example.)

cdp2 <- cdp
cdp2[["SelectionEffect"]] <- "Restrict"
app <- iSEE(sce, initial=list(rdp, cdp2))

Of course, not all receiving panels need to be plots. If we transmit a multiple selection to a column data table, the effect is to subset the rows of the table corresponding to the selected points.

cdt <- ColumnDataTable(ColumnSelectionSource="ReducedDimensionPlot1",
    SelectionBoxOpen=TRUE, PanelWidth=8L)
app <- iSEE(sce, initial=list(rdp, cdt))

As an aside, it is equally possible for a table to transmit a multiple selection to other panels. This is achieved using the search fields to subset the dataset to the desired selection.

app <- iSEE(sce, initial=list(
    ColumnDataTable(PanelWidth=8L, Search="L6a"),

Saving selections

In certain panels (usually plots), multiple selections can be saved to form disjoint selections. Receiving plots can then choose to respond to the union of all selections, just the active selection, or one of the saved selections. For example, here the column data plot is responding to the union of all selections.

rdp <- ReducedDimensionPlot(SelectionBoxOpen=TRUE, 
    SelectionHistory=list(brush, lasso))
cdp[["ColumnSelectionType"]] <- "Union"

app <- iSEE(sce, initial=list(rdp, cdp))

The saved selection history operates on a first-in-last-out basis. Upon saving, a snapshot is taken of the current "active" selection, i.e., the brush or lasso that is just created. Deletion will only operate on the last saved selection.

Single selections

Another mode of information sharing involves transmitting a selection of a single feature or sample. This allows users to conveniently direct other panels to focus on a feature or sample of interest. For example, we can transmit a single selection from a row data table to a reduced dimension plot, instructing the latter to color points by the expression of the chosen feature.

rdp <- ReducedDimensionPlot(VisualBoxOpen=TRUE, 
    ColorBy="Feature name")
rdt <- RowDataTable(Search="Neuro",
app <- iSEE(sce, initial=list(rdt, rdp))

The same approach can be used to control what is plotted on a feature assay plot. Clicking on a different row of the table will directly change the axes (in this case, the y-axis) of the plot, allowing the user to synchronise different aspects of the iSEE() interface to whatever is currently of interest.

fap <- FeatureAssayPlot(DataBoxOpen=TRUE,
    XAxis="Column data", XAxisColumnData="dissection_s")
app <- iSEE(sce, initial=list(rdt, fap))

We can also perform single selections on sample identities. In the example below, the reduced dimension plot highlights the location of the sample chosen in the column data table. This is useful for checking the behavior of specific samples of interest, e.g., during quality control.

cdt <- ColumnDataTable()
rdp <- ReducedDimensionPlot(VisualBoxOpen=TRUE,
    ColorBy="Sample name")
app <- iSEE(sce, initial=list(cdt, rdp))

Furthermore, it is possible to transmit single selections from a plot using brushes or lassos. If the brush/lasso contains multiple points, one of them is arbitrarily chosen for the purposes of obtaining a single selection. Below, we select a single highly variable gene to examine its distribution of expression values across the reduced dimension plot.

BB <- list(xmin = 7.9644610460621, xmax = 10.11596038509, ymin = 24.542997535857, ymax = 26.582843087131, 
    coords_css = list(xmin = 232.009614944458, xmax = 280.009614944458, ymin = 66.0096168518066, 
        ymax = 95.0096168518066), coords_img = list(xmin = 301.615757865723, xmax = 364.016431997355, 
        ymin = 85.8124987597648, ymax = 123.512497376937), img_css_ratio = list(x = 1.30001404440901, 
        y = 1.29999995231628), mapping = list(x = "X", y = "Y"), domain = list(left = -0.814852879170668, 
        right = 17.111910462584, bottom = -1.40152310296966, top = 29.4319851623629), 
    range = list(left = 46.986301369863, right = 566.922374429224, bottom = 603.013698630137, 
        top = 33.1552511415525), log = list(x = NULL, y = NULL), direction = "xy", 
    brushId = "RowDataPlot1_Brush", outputId = "RowDataPlot1")

rdpX <- RowDataPlot(YAxis="var_log", XAxis="Row data", 
    XAxisRowData="mean_log", BrushData=BB)
rdp <- ReducedDimensionPlot(VisualBoxOpen=TRUE,
    ColorBy="Feature name")
app <- iSEE(sce, initial=list(rdpX, rdp))

Dynamic selections

Most panels will have an option to dynamically change the choice of transmitting panel according to the last active selection in the app. This allows users to, for example, simply brush on any plot in the app and have all participating receiving panels immediately use that selection without requiring manual resetting of the transmitter. To illustrate, let's set up an instance with three different plots that all represent points as samples.

initial <- list(
        XAxis="Column data", XAxisColumnData="dissection_s"
    ColumnDataPlot(SelectionBoxOpen=TRUE, YAxis="NREADS",
        XAxis="Column data", XAxisColumnData="Core.Type"

app <- iSEE(sce, initial=initial)

Notice how we have checked the dynamic source selection option in the selection parameter box for all panels. This means that, upon making a selection in any one of the plots, all of the other plots will automatically respond as if they had been manually set to receive a transmission from that plot.

initial <- list(
        XAxis="Column data", XAxisColumnData="dissection_s"
    ColumnDataPlot(SelectionBoxOpen=TRUE, YAxis="NREADS",
        XAxis="Column data", XAxisColumnData="Core.Type"

app <- iSEE(sce, initial=initial)

The same logic applies for some parameters that respond to single selections. This allows a panel to respond to an appropriate single selection from any other panel in the interface, without requiring the user to manually set the relationship between panels. In the example below, users can easily define the y-axis of the feature assay plot from a selected row in the row data table or from a selected single point in the row data plot.

initial <- list(
    RowDataPlot(YAxis="var_log", XAxis="Row data",
        XAxisRowData="mean_log", BrushData=BB),
        XAxis="Column data", XAxisColumnData="dissection_s"

app <- iSEE(sce, initial=initial)

Session Info {.unnumbered}


Try the iSEE package in your browser

Any scripts or data that you put into this service are public.

iSEE documentation built on Feb. 3, 2021, 2:01 a.m.