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.