diff --git a/.development/ESY_Labs.qmd b/.development/ESY_Labs.qmd new file mode 100644 index 0000000..b665e92 --- /dev/null +++ b/.development/ESY_Labs.qmd @@ -0,0 +1,26 @@ +--- +output: html_document +--- + +## Overview + +- 1. Describe DOE in Excel + * Number of parameters + * Boundaries of parameters +- 2. Rscript + * generates DOE matrix +- 3. TPA sends DOE matrix back to ELN +- 4. User collects DOE matrix via chemotion python API using the Device computer +- 5. Device measures samples and sends results back to ELN via Inbox (via Shuttle) + +## Alternative + +- 1. Describe DOE in Excel + * Number of parameters + * Boundaries of parameters +- 2. Rscript + * generates DOE matrix + * uses python API to generate one reaction variation per row in the DOE matrix +- 3. User collects Reaction variation via python API +- 4. Device measures samples and sends results back to ELN via Inbox (via Shuttle) +- 5. Maybe, python API can link the results with the respective Reaction variation diff --git a/Rplots.pdf b/Rplots.pdf deleted file mode 100644 index 772dd80..0000000 Binary files a/Rplots.pdf and /dev/null differ diff --git a/Start_Serverless_App.R b/Start_Serverless_App.R index 506fcb1..1228eec 100644 --- a/Start_Serverless_App.R +++ b/Start_Serverless_App.R @@ -1,4 +1,3 @@ Sys.setenv(RUN_MODE = "BROWSER") -library(bs) app <- bs::app() shiny::shinyApp(app$ui, app$server) diff --git a/bs/R/DoseResponse.R b/bs/R/DoseResponse.R index e05e45e..32d36b6 100644 --- a/bs/R/DoseResponse.R +++ b/bs/R/DoseResponse.R @@ -44,6 +44,7 @@ DoseResponseUI <- function(id) { tabPanel("Results Table", tableOutput(NS(id, "dr_result"))), tabPanel("Results Plot", + uiOutput(NS(id, "dropdown_plots")), plotOutput(NS(id, "dr_result_plot")), actionButton(NS(id, "previousPage"), "Previous plot"), actionButton(NS(id, "nextPage"), "Next plot") @@ -58,6 +59,7 @@ DoseResponseServer <- function(id, data, listResults) { r_vals <- reactiveValues( plots = NULL, + names = NULL, # For dropdown_plots currentPage = 1 ) @@ -217,6 +219,8 @@ DoseResponseServer <- function(id, data, listResults) { print_noti(!is.null(data$formula), "You have to set a formula") req(!is.null(data$formula)) r_vals$plots <- NULL # reset + r_vals$names <- NULL # reset + r_vals$currentPage <- 1 # reset f <- as.character(data$formula) dep <- f[2] indep <- f[3] @@ -246,6 +250,7 @@ DoseResponseServer <- function(id, data, listResults) { resP <- resP[!is.null(resP)] resP <- resP[!sapply(resP, is.null)] r_vals$plots <- resP + r_vals$names <- resDF$name resPlot <- resP }) if (inherits(e, "try-error")) { @@ -269,6 +274,29 @@ DoseResponseServer <- function(id, data, listResults) { output$dr_result_plot <- renderPlot(r_vals$plots[[r_vals$currentPage]]) }) + output[["dropdown_plots"]] <- renderUI({ + req(!is.null(r_vals$plots)) + req(is.list(r_vals$plots)) + req(length(r_vals$plots) > 1) + req(!is.null(r_vals$names)) + req(length(r_vals$names) > 1) + selectInput( + inputId = "DOSERESPONSE-dropdown_plots", + label = "Select plot", + choices = r_vals$names, + selected = r_vals$names[1] + ) + }) + + observeEvent(input$dropdown_plots, { + req(!is.null(r_vals$plots)) + req(is.list(r_vals$plots)) + req(length(r_vals$plots) > 1) + req(!is.null(r_vals$names)) + req(length(r_vals$names) > 1) + r_vals$currentPage <- which(input$dropdown_plots == r_vals$names) + }) + observeEvent(input$nextPage, { req(!is.null(r_vals$plots)) req(is.list(r_vals$plots)) diff --git a/data.html b/data.html deleted file mode 100644 index 070f90f..0000000 --- a/data.html +++ /dev/null @@ -1,87 +0,0 @@ - - -
- - -Documentation:
-This table displays a sample dataset in a tabular format. Each row represents a data point with three columns:
-ID | -Value | -Category | -
---|---|---|
1 | -10.5 | -A | -
2 | -7.8 | -B | -
3 | -12.4 | -A | -
4 | -9.3 | -C | -
5 | -11.7 | -B | -