Description Slot overview Constructor Supported methods Author(s) Examples
The ColumnDataTable is a panel class for creating a ColumnTable where the value of the table is defined as the colData
of the SummarizedExperiment.
It provides functionality to extract the colData
to coerce it into an appropriate data.frame in preparation for rendering.
This class inherits all slots from its parent ColumnTable and Table classes.
ColumnDataTable(...)
creates an instance of a ColumnDataTable class, where any slot and its value can be passed to ...
as a named argument.
Note that ColSearch
should be a character vector of length equal to the total number of columns in the colData
, though only the entries for the atomic fields will actually be used.
In the following code snippets, x
is an instance of a ColumnDataTable class.
Refer to the documentation for each method for more details on the remaining arguments.
For setting up data values:
.cacheCommonInfo(x)
adds a "ColumnDataTable"
entry containing valid.colData.names
, a character vector of names of atomic columns of the colData
.
This will also call the equivalent ColumnTable method.
.refineParameters(x, se)
adjusts ColSearch
to a character vector of length equal to the number of atomic fields in the colData
.
This will also call the equivalent ColumnTable method for further refinements to x
.
For defining the interface:
.fullName(x)
will return "Column data table"
.
.panelColor(x)
will return the specified default color for this panel class.
For creating the output:
.generateTable(x, envir)
will modify envir
to contain the relevant data.frame for display,
while returning a character vector of commands required to produce that data.frame.
Each row of the data.frame should correspond to a column of the SummarizedExperiment.
For documentation:
.definePanelTour(x)
returns an data.frame containing the steps of a panel-specific tour.
Unless explicitly specialized above, all methods from the parent class Panel are also available.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #################
# For end-users #
#################
x <- ColumnDataTable()
x[["Selected"]]
x[["Selected"]] <- "SOME_SAMPLE_NAME"
##################
# For developers #
##################
library(scater)
sce <- mockSCE()
# Search column refinement works as expected.
sce0 <- .cacheCommonInfo(x, sce)
.refineParameters(x, sce0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.