Commit f525b299 authored by mmassaviol's avatar mmassaviol
Browse files

Debug select input

Add event to hide param specific to Single end reads or paired end reads
parent ec883199
......@@ -103,23 +103,16 @@ generate_page_input <- function(res, cnt) {
res <- res + '\t\tselectInput("'+ cnt$name +'", label = "'+ cnt$label +'", choices = list('
cpt = 1
if(length(cnt$choices) > 0) {
for(ch in 1:length(cnt$choices)){
choices = cnt$choices[[ch]]
value = choices
if(is.character(choices)) {
value = '"' + choices + '"'
}
for(ch in cnt$choices){
if(ch < length(cnt$choices)) {
res <- res + '"' + choices + '"' + ' = ' + value + ', '
if(cpt < length(cnt$choices)) {
res <- res + '"' + names(ch) + '" = "' + ch[names(ch)] + '", '
} else {
res <- res + '"' + choices + '"' + ' = ' + value + '), '
res <- res + '"' + names(ch) + '" = "' + ch[names(ch)] + '"), '
}
cpt = cpt + 1
}
}
......@@ -940,6 +933,26 @@ generate_app <- function() {
res <- res + '\t\t\t\tshinyjs::disable(x) }\n'
res <- res + '}\n\n'
res <- res + '\tobserveEvent(input$SeOrPe,{\n'
res <- res + '\t\tinput_list <- reactiveValuesToList(input)\n'
res <- res + '\t\tSE <- which(sapply(names(input_list),function(x) {any(grepl("_SE$",x))}))\n'
res <- res + '\t\tPE <- which(sapply(names(input_list),function(x) {any(grepl("_PE$",x))}))\n'
res <- res + '\t\tfor (element in SE){\n'
res <- res + '\t\t\tif (input$SeOrPe == "PE")\n'
res <- res + '\t\t\t\tshinyjs::hide(names(input_list)[element])\n'
res <- res + '\t\t\telse{\n'
res <- res + '\t\t\t\tshinyjs::show(names(input_list)[element])\n'
res <- res + '\t\t\t}\n'
res <- res + '\t\t}\n'
res <- res + '\t\tfor (element in PE){\n'
res <- res + '\t\tif (input$SeOrPe == "SE")\n'
res <- res + '\t\t\t\tshinyjs::hide(names(input_list)[element])\n'
res <- res + '\t\t\telse{\n'
res <- res + '\t\t\t\tshinyjs::show(names(input_list)[element])\n'
res <- res + '\t\t\t}\n'
res <- res + '\t\t}\n'
res <- res + '\t})\n'
res <- res + 'source("./server/opt_global.R", local=T)\n'
for(x in 1:length(APP$pages)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment