query_qMetacell | R Documentation |
This function is a shiny module to create a list of queries (instances of the
class FunctionFilter
to filter the quantitative metadata of an instance
of the class SummarizedExperiment
)
mod_build_qMetacell_FunctionFilter_ui(id)
mod_build_qMetacell_FunctionFilter_server(
id,
obj,
conds,
list_tags = reactive({
NULL
}),
keep_vs_remove = reactive({
NULL
}),
val_vs_percent = reactive({
NULL
}),
operator = reactive({
NULL
}),
reset = reactive({
NULL
}),
is.enabled = reactive({
TRUE
})
)
id |
xxx |
obj |
An instance of the class |
conds |
A |
list_tags |
xxx |
keep_vs_remove |
xxx |
val_vs_percent |
xxx |
operator |
xxx |
reset |
A |
is.enabled |
A |
As for all modules used with MagellanNTK
, the return value is a
list()
of two items:
trigger : xxx
value: In this case, it contains a list() of three slots:
ll.fun: a list() of instances of the class FunctionFilter
,
ll.query: a list of character()
which describe the queries in natural
language,
ll.widgets.value: a list of the values of widgets.
if (interactive()) {
data(ft_na, package='DaparToolshed')
ui <- mod_build_qMetacell_FunctionFilter_ui("query")
server <- function(input, output, session) {
rv <- reactiveValues(
res = NULL
)
ll.tags <- c(
"None" = "None",
qMetacell.def(typeDataset(ft_na[[1]]))$node
)
rv.custom$res <- mod_build_qMetacell_FunctionFilter_server("query",
obj = reactive({
ft_na[[1]]
}),
conds = reactive({
colData(ft_na)$Condition
}),
list_tags = reactive({
ll.tags
}),
keep_vs_remove = reactive({
setNames(nm = c("delete", "keep"))
}),
val_vs_percent = reactive({
setNames(nm = c("Count", "Percentage"))
}),
operator = reactive({
setNames(nm = SymFilteringOperators())
})
)
observeEvent(rv.custom$res$dataOut()$trigger, ignoreNULL = TRUE,
ignoreInit = TRUE, {
print(rv.custom$res$dataOut()$fun)
})
}
shinyApp(ui = ui, server = server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.