@@ -71,16 +71,6 @@ mod_curate_server <- function(id,r){
71
71
shinyjs :: show(id = " Curate" )
72
72
}) | > bindEvent(input $ ok )
73
73
74
- # selectInput custom function (row argument for ROWnames, default=COLnames for choices)
75
- selectInput01 <- function (id , label , n , r , row = FALSE ) {
76
- if (row == FALSE ) {
77
- selectInput(ns(id ), label = label , choices = c(" " , colnames(r $ fs )), selected = colnames(r $ fs )[n ])
78
- }
79
- else {
80
- selectInput(ns(id ), label = label , choices = c(" " , rownames(pData(r $ fs ))), rownames(pData(r $ fs ))[n ])
81
- }
82
- }
83
-
84
74
# Restart curation MODAL
85
75
modal_confirm <- modalDialog(
86
76
" Are you sure you want to continue?" ,
@@ -95,13 +85,13 @@ mod_curate_server <- function(id,r){
95
85
output $ input_selection <- renderUI({
96
86
req(r $ fs )
97
87
tagList(
98
- selectInput01(" forward_scatter" , " Forward Scatter" , n = 1 , r = r ),
99
- selectInput01(" side_scatter" , " Side Scatter" , n = 2 , r = r ),
100
- selectInput01(" kras_channel" , " KRas channel" , n = 3 , r = r ),
101
- selectInput01(" myhc_channel" , " Myosin channel" , n = 6 , r = r ),
102
- selectInput01(" negative_control" , " Negative control" , n = 1 , r = r , row = TRUE ),
103
- selectInput01(" positive_control_kras" , " Positive control (KRas)" , n = 2 , r = r , row = TRUE ),
104
- selectInput01(" positive_control_myhc" , " Positive control (MYHC)" , n = 3 , r = r , row = TRUE )
88
+ selectInput01(" forward_scatter" , " Forward Scatter" , n = 1 , r = r , ns = ns ),
89
+ selectInput01(" side_scatter" , " Side Scatter" , n = 2 , r = r , ns = ns ),
90
+ selectInput01(" kras_channel" , " KRas channel" , n = 3 , r = r , ns = ns ),
91
+ selectInput01(" myhc_channel" , " Myosin channel" , n = 6 , r = r , ns = ns ),
92
+ selectInput01(" negative_control" , " Negative control" , n = 1 , r = r , row = TRUE , ns = ns ),
93
+ selectInput01(" positive_control_kras" , " Positive control (KRas)" , n = 2 , r = r , row = TRUE , ns = ns ),
94
+ selectInput01(" positive_control_myhc" , " Positive control (MYHC)" , n = 3 , r = r , row = TRUE , ns = ns )
105
95
)
106
96
})
107
97
@@ -319,6 +309,19 @@ make_gate <- function(lower_limit, col_name, filterId) {
319
309
return (rectangleGate(filterId = filterId , .gate = mat ))
320
310
}
321
311
312
+ # selectInput01:
313
+ # row argument:
314
+ # - TRUE for ROWnames in selectInput's "choices" argument
315
+ # - FALSE (default) for COLnames in selectInput's "choices" argument
316
+ selectInput01 <- function (id , label , n , r , row = FALSE , ns ) {
317
+ if (row == FALSE ) {
318
+ selectInput(ns(id ), label = label , choices = c(" " , colnames(r $ fs )), selected = colnames(r $ fs )[n ])
319
+ }
320
+ else {
321
+ selectInput(ns(id ), label = label , choices = c(" " , rownames(pData(r $ fs ))), rownames(pData(r $ fs ))[n ])
322
+ }
323
+ }
324
+
322
325
323
326
# # To be copied in the UI
324
327
# mod_curate_ui("curate_1")
0 commit comments