Newer
Older
l <- c(if (checked[["MS2 EIC"]]) "ms2_eic_int" else NULL,l)
l <- c(if (checked[["MS2 Spectrum"]]) "ms2_spec_int" else NULL,l)
rv_state$conf$figures[["logaxes"]] <- l[!sapply(l,is.null)]
rv_state$conf$figures$rt_min <- uni_ass("plot_rt_min","plot_rt_min_unit")
rv_state$conf$figures$rt_max <- uni_ass("plot_rt_max","plot_rt_max_unit")
})
```
<!-- Report -->
```{r, include='false', context = 'server'}
observe({
rv_state$conf$report$author <- input$rep_aut
rv_state$conf$report$title <- input$rep_tit
})
```
<!-- Render -->
```{r, include="false", context="server"}
output$project <- renderText(rv_state$conf$project)
output$comp_lists <- renderText({
lsts <- rev2list(rv_state$conf$compounds$lists)
if (length(lsts) > 0 &&
isTruthy(lsts) &&
lsts != "Nothing selected.") {
paste(c("<ul>",
sapply(lsts,
function (x) paste("<li>",x,"</li>")),
"</ul>"))
} else "No compound list selected yet."
})
output$setids <- renderText({
sets <- rv_state$conf$compounds$sets
if (isTruthy(sets) && sets != "Nothing selected.")
paste("selected <em>setid</em> table:",
sets) else "No <em>setid</em> table selected."
})
output$order_summ <- rhandsontable::renderRHandsontable(rhandsontable::rhandsontable(def_ord_summ,
manualRowMove = T))
output$datafiles <- rhandsontable::renderRHandsontable(
{
rhandsontable::rhandsontable(as.data.frame(res),
width = "50%",
height = "25%",
allowInvalid=F)
})
output$datatab <- rhandsontable::renderRHandsontable(
{
if (NROW(res)>0) {
res$tag <- factor(res$tag,
levels = c(unique(res$tag),
"invalid"))
res$set <- factor(res$set,
levels = c(unique(setid$set),
"invalid"))
res$adduct <- factor(res$adduct,
levels = shinyscreen:::DISP_ADDUCTS)
}
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
rhandsontable::rhandsontable(res,stretchH="all",
allowInvalid=F)
})
output$comp_table <- DT::renderDataTable({
state <- rf_compound_input_state()
DT::datatable(state$input$tab$cmpds,
style = 'bootstrap',
class = 'table-condensed',
extensions = 'Scroller',
options = list(scrollX = T,
scrollY = 200,
deferRender = T,
scroller = T))
})
output$setid_table <- DT::renderDataTable({
state <- rf_compound_input_state()
DT::datatable(state$input$tab$setid,
style = 'bootstrap',
class = 'table-condensed',
extensions = 'Scroller',
options = list(scrollX = T,
scrollY = 200,
deferRender = T,
scroller = T))
output$summ_subset <- rhandsontable::renderRHandsontable({
rhandsontable::rhandsontable(def_summ_subset)
})
output$summ_table <- DT::renderDataTable({
tab <- rv_state$out$tab$flt_summ
nms <- colnames(tab)
dpl_nms <- nms[nms!="Files"]
validate(need(NROW(tab)>0, message = "Please prescreen the data first."))
style = 'bootstrap',
class = 'table-condensed',
extensions = 'Scroller',
options = list(scrollX = T,
scrollY = 200,
deferRender = T,
scroller = T))
})
output$plot_set_b_ctrl <- renderUI({
tab <- rv_state$out$tab$flt_summ
req(NROW(tab)>0)
selectInput(inputId = "plot_set_b",
label = "Select set",
choices = c("uninitialised"=0))
})
output$plot_b_ctrl <- renderUI({
tab <- rv_state$out$tab$flt_summ
req(NROW(tab)>0)
actionButton(inputId = "plot_b",
label= "Generate plots")
})
```
```{r, echo=F, context = 'server'}
session$onSessionEnded(function () stopApp())