query-metacell: xxxx

query-metacellR Documentation

xxxx

Description

xxxx

Usage

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
 })
)

Arguments

id

xxx

obj

xxx

filters

xxx

val_vs_percent

xxx

operator

xxx

reset

xxx

op_names

xxx

Value

NA

Examples


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)


samWieczorek/DAPAR2 documentation built on Oct. 15, 2023, 1:45 p.m.