query-metacell | R Documentation |
xxxx
mod_query_metacell_ui(id)
mod_query_metacell_server(
id,
obj = reactive({
NULL
}),
filters = reactive({
NULL
}),
val_vs_percent = reactive({
NULL
}),
operator = reactive({
NULL
}),
reset = reactive({
NULL
}),
op_names = reactive({
NULL
})
)
id |
xxx |
obj |
xxx |
filters |
xxx |
val_vs_percent |
xxx |
operator |
xxx |
reset |
xxx |
op_names |
xxx |
NA
library(shiny)
library(shinyBS)
ui <- fluidPage(
tagList(
shinyjs::useShinyjs(),
actionButton('external_reset', 'Reset'),
mod_query_metacell_ui('query'),
uiOutput('res'),
shinyjs::disabled(actionButton('perform', 'Perform')),
)
)
server <- function(input, output) {
utils::data("Exp1_R25_prot", package='DaparToolshedData')
tmp <- mod_query_metacell_server('query',
obj = reactive({Exp1_R25_prot}),
reset = reactive({input$external_reset + input$perform}),
op_names = reactive({c('Push p-value', 'Keep original p-value')})
)
observeEvent(tmp()$trigger, {
#print(tmp()$indices)
shinyjs::toggleState("perform",
condition = length(tmp()$indices) > 0
)
})
output$res <- renderUI({
p(paste0(tmp()$params$MetacellTag, collapse='\n'))
})
}
shinyApp(ui = ui, server = server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.