query_qMetadata: Build queries for filtering quantitative metadata

query_qMetadataR Documentation

Build queries for filtering quantitative metadata

Description

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)

Usage

mod_build_qMetadata_FunctionFilter_ui(id)

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

Arguments

id

xxx

obj

An instance of the class SummarizedExperiment

conds

A character() which contains the name of the conditions. The length of this vector must be equal to the number of samples in the assay (i.e. number of columns in àssay(obj))

list_tags

xxx

keep_vs_remove

xxx

val_vs_percent

xxx

operator

xxx

reset

A ├Čnteger(1) xxxx

is.enabled

A logical(1) that indicates whether the module is enabled or disabled. This is a remote command.

Examples

if (interactive()){
data(ft_na)
ui <- mod_build_qMetadata_FunctionFilter_ui('query')

server <- function(input, output, session) {
  
  rv <- reactiveValues(
    res = NULL
  )
  ll.tags <- c('None' = 'None', 
               qMetadata.def(typeDataset(ft_na[[1]]))$node)
  rv.custom$res <- mod_build_qMetadata_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)
}

samWieczorek/Dapar2 documentation built on May 13, 2022, 9:23 a.m.