RowDataTable-class | R Documentation |
The RowDataTable is a panel class for creating a ColumnTable where the value of the table is defined as the rowData
of the SummarizedExperiment.
It provides functionality to extract the rowData
to coerce it into an appropriate data.frame in preparation for rendering.
This class inherits all slots from its parent ColumnTable and Table classes.
RowDataTable(...)
creates an instance of a RowDataTable 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 rowData
, though only the entries for the atomic fields will actually be used.
In the following code snippets, x
is an instance of a RowDataTable class.
Refer to the documentation for each method for more details on the remaining arguments.
For setting up data values:
.cacheCommonInfo(x)
adds a "RowDataTable"
entry containing valid.rowData.names
, a character vector of names of atomic columns of the rowData
.
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 rowData
.
This will also call the equivalent ColumnTable method for further refinements to x
.
For defining the interface:
.fullName(x)
will return "Row 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 row 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
#################
# For end-users #
#################
x <- RowDataTable()
x[["Selected"]]
x[["Selected"]] <- "SOME_ROW_NAME"
##################
# For developers #
##################
library(scater)
sce <- mockSCE()
# Sets the search columns appropriately.
sce <- .cacheCommonInfo(x, sce)
.refineParameters(x, sce)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.