DifferentialStatisticsTable-class {iSEEu} | R Documentation |
A table that dynamically computes differential statistics based on a selected subset of samples. Comparisons are made between the active selection in the transmitting panel and (i) all non-selected points, if no saved selections are available; or (ii) each subset of points in each saved selection.
The following slots control the thresholds used in the visualization:
LogFC
, a numeric scalar indicating the log-fold change threshold to test against.
Defaults to zero.
TestMethod
, string indicating the test to use (based on the findMarkers
function from scran).
This can be "t"
(default), "wilcox"
or "binom"
.
Assay
, string indicating the assay to use for testing.
Defaults to the first named assay in the SummarizedExperiment.
In addition, this class inherits all slots from its parent RowTable, Table and Panel classes.
DifferentialStatisticsTable(...)
creates an instance of a DifferentialStatisticsTable class,
where any slot and its value can be passed to ...
as a named argument.
In the following code snippets, x
is an instance of a DifferentialStatisticsTable class.
Refer to the documentation for each method for more details on the remaining arguments.
For setting up data values:
.cacheCommonInfo(x)
adds a "DifferentialStatisticsTable"
entry containing valid.assay.names
.
This will also call the equivalent RowTable method.
.refineParameters(x, se)
returns x
after setting "Assay"
to the first valid value.
This will also call the equivalent RowTable method for further refinements to x
.
If valid assay names are not available, NULL
is returned instead.
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 "Differential statistics table"
.
.hideInterface(x)
will return TRUE
for UI elements related to multiple row selections,
otherwise calling the method for RowTable.
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 RowTable method.
For creating the table:
.generateTable(x, envir)
will create a data.frame of newly computed statistics in envir
.
The method will return the commands required to do so.
library(scRNAseq) library(scater) sce <- ReprocessedAllenData(assays="tophat_counts") sce <- logNormCounts(sce, exprs_values="tophat_counts") sce <- runPCA(sce, ncomponents=4) sce <- runTSNE(sce) dst <- DifferentialStatisticsTable(PanelId=1L, PanelWidth=8L, ColumnSelectionSource="ReducedDimensionPlot1") rdp <- ReducedDimensionPlot(PanelId=1L, ColorByFeatureSource="DifferentialStatisticsTable1") if (interactive()) { iSEE(sce, initial=list(rdp, dst)) }