MAEFilteredDataset
R6 class
MAEFilteredDataset.Rd
MAEFilteredDataset
R6 class
MAEFilteredDataset
R6 class
Super class
teal.slice::FilteredDataset
-> MAEFilteredDataset
Methods
Inherited methods
teal.slice::FilteredDataset$get_dataname()
teal.slice::FilteredDataset$get_dataset()
teal.slice::FilteredDataset$get_dataset_label()
teal.slice::FilteredDataset$get_filter_state()
teal.slice::FilteredDataset$get_filter_states()
teal.slice::FilteredDataset$get_filtered_dataname()
teal.slice::FilteredDataset$get_formatted_filter_state()
teal.slice::FilteredDataset$get_hash()
teal.slice::FilteredDataset$get_keys()
teal.slice::FilteredDataset$get_metadata()
teal.slice::FilteredDataset$get_varnames()
teal.slice::FilteredDataset$queues_empty()
teal.slice::FilteredDataset$server()
teal.slice::FilteredDataset$ui()
Method new()
Initialize MAEFilteredDataset
object
Usage
MAEFilteredDataset$new(
dataset,
dataname,
keys = character(0),
label = character(0),
metadata = NULL
)
Arguments
dataset
(
MulitiAssayExperiment
)
singleMultiAssayExperiment
for which filters are rendereddataname
(
character
)
A given name for the dataset it may not contain spaceskeys
optional, (
character
)
Vector with primary keyslabel
(
character
)
Label to describe the datasetmetadata
(named
list
orNULL
)
Field containing metadata about the dataset. Each element of the list should be atomic and length one.
Method get_call()
Get filter expression
This functions returns filter calls equivalent to selected items
within each of filter_states
. Configuration of the calls is constant and
depends on filter_states
type and order which are set during initialization.
This class contains multiple FilterStates
:
colData(dataset)
for this object singleMAEFilterStates
which returnssubsetByColData
callexperimentsfor each experiment single
SEFilterStates
andFilterStates_matrix
, both returnssubset
call
Method get_varlabels()
Gets labels of variables in the data
Variables are the column names of the data.
Either, all labels must have been provided for all variables
in set_data
or NULL
.
Method get_filter_overview_info()
Get filter overview rows of a dataset
Method get_filterable_varnames()
Gets variable names for the filtering.
Method set_filter_state()
Set filter state
Arguments
state
(
named list
)
names of the list should correspond to the names of the initializedFilterStates
kept inprivate$filter_states
. For this object they are"subjects"
and names of the experiments. Values of initial state should be relevant to the referred column....
ignored.
Examples
utils::data(miniACC, package = "MultiAssayExperiment")
dataset <- teal.slice:::MAEFilteredDataset$new(miniACC, "MAE")
fs <- list(
subjects = list(
years_to_birth = list(selected = c(30, 50), keep_na = TRUE, keep_inf = FALSE),
vital_status = list(selected = "1", keep_na = FALSE),
gender = list(selected = "female", keep_na = TRUE)
),
RPPAArray = list(
subset = list(ARRAY_TYPE = list(selected = "", keep_na = TRUE))
)
)
dataset$set_filter_state(state = fs)
shiny::isolate(dataset$get_filter_state())
Method remove_filter_state()
Remove one or more FilterState
of a MAEFilteredDataset
Method ui_add_filter_state()
UI module to add filter variable for this dataset
UI module to add filter variable for this dataset
Method srv_add_filter_state()
Server module to add filter variable for this dataset
Server module to add filter variable for this dataset.
For this class srv_add_filter_state
calls multiple modules
of the same name from FilterStates
as MAEFilteredDataset
contains one FilterStates
object for colData
and one for each
experiment.
Method get_filter_overview_nsubjs()
Gets filter overview subjects number
Usage
MAEFilteredDataset$get_filter_overview_nsubjs(
filtered_dataset = self$get_dataset(),
subject_keys
)
Examples
## ------------------------------------------------
## Method `MAEFilteredDataset$set_filter_state`
## ------------------------------------------------
utils::data(miniACC, package = "MultiAssayExperiment")
dataset <- teal.slice:::MAEFilteredDataset$new(miniACC, "MAE")
fs <- list(
subjects = list(
years_to_birth = list(selected = c(30, 50), keep_na = TRUE, keep_inf = FALSE),
vital_status = list(selected = "1", keep_na = FALSE),
gender = list(selected = "female", keep_na = TRUE)
),
RPPAArray = list(
subset = list(ARRAY_TYPE = list(selected = "", keep_na = TRUE))
)
)
dataset$set_filter_state(state = fs)
#> NULL
shiny::isolate(dataset$get_filter_state())
#> $subjects
#> $subjects$years_to_birth
#> $subjects$years_to_birth$selected
#> [1] 30 50
#>
#> $subjects$years_to_birth$keep_na
#> [1] TRUE
#>
#> $subjects$years_to_birth$keep_inf
#> [1] FALSE
#>
#>
#> $subjects$vital_status
#> $subjects$vital_status$selected
#> [1] "1"
#>
#> $subjects$vital_status$keep_na
#> [1] FALSE
#>
#>
#> $subjects$gender
#> $subjects$gender$selected
#> [1] "female"
#>
#> $subjects$gender$keep_na
#> [1] TRUE
#>
#>
#>
#> $RPPAArray
#> $RPPAArray$subset
#> $RPPAArray$subset$ARRAY_TYPE
#> $RPPAArray$subset$ARRAY_TYPE$selected
#> [1] ""
#>
#> $RPPAArray$subset$ARRAY_TYPE$keep_na
#> [1] TRUE
#>
#>
#>
#>