Description Slot overview Constructor Supported methods Author(s) Examples
A table where each row is itself a feature set and can be clicked to transmit a multiple feature selection to another panel.
The following slots control the feature sets in use:
Collection
, string specifying the type of feature set collection to show.
Defaults to the first set.
CreateCollections
, a named character vector where each entry is named after a feature set collection.
Each entry should be a string containing R commands to define a data.frame named tab
, where each row is a feature set and the row names are the names of those sets.
RetrieveSet
, a named character vector where each entry is named after a feature set collection.
Each entry should be a string containing R commands to define a character vector named selected
containing the identity of all rows of the SummarizedExperiment in the set of interest.
(These commands can assume that a .set_id
variable is present containing the name of the chosen feature set,
as well as the se
variable containing the input SummarizedExperiment object.)
The following slots control the selections:
Selected
, a string containing the name of the currently selected gene set.
Defaults to ""
, i.e., no selection.
Search
, a string containing the regular expression for the global search.
Defaults to ""
, i.e., no search.
SearchColumns
, a character vector where each entry contains the search string for each column.
Defaults to an empty character vector, i.e., no search.
In addition, this class inherits all slots from its parent Panel class.
FeatureSetTable(...)
creates an instance of a FeatureSetTable class,
where any slot and its value can be passed to ...
as a named argument.
Initial values for CreateCollections
and RetrieveSet
are taken from the fields of the same name in the output of getFeatureSetCommands
.
If these fields are also NULL
, we fall back to the output of createGeneSetCommands
with default parameters.
These parameters are considered to be global constants and cannot be changed inside the running iSEE
application.
Similarly, it is not possible for multiple FeatureSetTables in the same application to have different values for these slots;
within the app, all values are set to those of the first encountered FeatureSetTable to ensure consistency.
In the following code snippets, x
is an instance of a FeatureSetTable class.
Refer to the documentation for each method for more details on the remaining arguments.
For setting up data values:
.cacheCommonInfo(x)
adds a "FeatureSetTable"
entry containing available.sets
, a named list of DataFrames containing information about the individual gene sets for each collection.
This will also call the equivalent Panel method.
.refineParameters(x, se)
replaces NA
values in Collection
with the first valid collection.
It also replaces NA
values for Selected
with the first valid set in the chosen collection.
This will also call the equivalent Panel method.
For defining the interface:
.defineDataInterface(x, se, select_info)
returns a list of interface elements for manipulating all slots described above.
.panelColor(x)
will return the specified default color for this panel class.
.fullName(x)
will return "Gene set table"
.
.hideInterface(x)
will return TRUE
for UI elements related to multiple selections,
otherwise calling the method for Panel.
.defineOutput(x)
will return a HTML element containing a datatable
widget.
For monitoring reactive expressions:
.createObservers(x, se, input, session, pObjects, rObjects)
sets up observers for all new slots described above, as well as in the parent classes via the Panel method.
For creating the table:
.generateOutput(x, envir)
will create a data.frame of gene set descriptions in envir
, based on the contents of x[["CreateCollections"]]
.
It will also return the commands required to do so and the name of the variable corresponding to said data.frame.
.renderOutput(x, se, ..., output, pObjects, rObjects)
will add a datatable
widget to the output,
which is used to render the aforementioned data.frame.
For controlling the multiple selections:
.multiSelectionDimension(x)
returns "row"
.
.multiSelectionCommands(x, index)
returns a string specifying the commands to be used to extract the identities of the genes in the currently selected set, based on the contents of x[["RetrieveSet"]]
.
index
is ignored.
.multiSelectionActive(x)
returns the name of the currently selected gene set,
unless no selection is made, in which case NULL
is returned.
.multiSelectionClear(x)
returns x
but with the Selected
slot replaced by an empty string.
.multiSelectionAvailable(x, contents)
returns contents$available
,
which is set to the number of features in se
.
For documentation:
.definePanelTour(x)
returns an data.frame containing the steps of a panel-specific tour.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(scRNAseq)
sce <- LunSpikeInData(location=FALSE)
library(scater)
sce <- logNormCounts(sce)
library(scran)
rowData(sce) <- cbind(rowData(sce), modelGeneVarWithSpikes(sce, "ERCC"))
cmds <- createGeneSetCommands(collections="GO",
organism="org.Mm.eg.db", identifier="ENSEMBL")
setFeatureSetCommands(cmds)
gst <- FeatureSetTable(PanelId=1L)
rdp <- RowDataPlot(RowSelectionSource="FeatureSetTable1",
SelectionEffect="Color",
XAxis="Row data", XAxisRowData="mean", YAxis="total")
rdt <- RowDataTable(RowSelectionSource="FeatureSetTable1")
if (interactive()) {
iSEE(sce, initial=list(gst, rdp, rdt))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.