diff --git a/.DS_Store b/.DS_Store index a67ee6d..19e9115 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/R/.DS_Store b/R/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/R/.DS_Store differ diff --git a/TestFLinADCC1CYB.numbers b/TestFLinADCC1CYB.numbers new file mode 100644 index 0000000..1aca84e Binary files /dev/null and b/TestFLinADCC1CYB.numbers differ diff --git a/TestFLinADCC2_CYB.numbers b/TestFLinADCC2_CYB.numbers new file mode 100644 index 0000000..d8be0bd Binary files /dev/null and b/TestFLinADCC2_CYB.numbers differ diff --git a/TestFileRoxygen.R b/TestFileRoxygen.R index 313a326..e482748 100644 --- a/TestFileRoxygen.R +++ b/TestFileRoxygen.R @@ -203,7 +203,7 @@ x <- 1; Div <- 3;N <- 0; res <- c(); noDil <- 7 divFUN(x,Div,N,res,noDil) # [1] 0.3333333333 0.1111111111 0.0370370370 0.0123456790 0.0041152263 0.0013717421 0.0004572474 - +####### circle <- read.csv("./tests/circle.csv") all_l2 <- read.csv("./tests/all_l2.csv") sigmoid <- c(10.0, 10.0, 110.0, 110.0, 1.0, 1.0, -3.5, 0.0) @@ -217,4 +217,22 @@ plotT = c(114.213375,97.588663,80.963951,64.339239,47.714527,31.102604,14.477892 PLOT <- PlotLinPLA_FUNC(circle, sigmoid, all_l2, pl_df, indS,indT) PlotLinTest.png +############ +dat <- data.frame(R_dil1 = c(10.0651024695491, 10.9844983291817, 10.7635586089293, 10.4597656321327, 10.3898668457823, 10.8171761349909, +10.319758021908, 10.1304854046653), +R_dil2 = c(10.9649145494504, 10.0202868589385, 10.8424145955735, 10.9311360356894, 10.3284659026404, +10.6890147558796, 10.3014450252305, 10.9594838595181), +R_dil3 = c(10.4630510824383, 10.4566715089363, 10.2350765290036, 10.3300581874798, 10.9648088137065, +10.286893755805, 10.4856643841389, 10.5275521552307), +T_dil1 = c(12.732175566336, 12.7756403995095, 12.1672539684741, 12.7060603907892, 12.8000685682832, +12.8800092157515, 12.7160581291873, 12.6996878912416), +T_dil2 = c(12.3923194313831, 12.0943488144175, 12.7955302154828, 12.4825917078735, 12.6856540203788, +12.7348548498556, 12.9222470610476, 12.1186618671252), +T_dil3 = c(12.7899182255274, 12.9722600411128, 12.7078445380891, 12.4913523531941, 12.1718281909609, +12.5313873615133, 12.952802332772, 12.5960321394342), +log_dose = c(0, -1.09861228866811, -2.19722457733622, -3.29583686600433, -4.39444915467244, +-5.49306144334055, -6.59167373200866, -7.69028602067677)) +p <- plotSingularity(dat) +print(p) +# plotSingularityTest.png \ No newline at end of file diff --git a/dev/.DS_Store b/dev/.DS_Store new file mode 100644 index 0000000..1f2a61b Binary files /dev/null and b/dev/.DS_Store differ diff --git a/Global.R b/dev/Global.R similarity index 96% rename from Global.R rename to dev/Global.R index 9f175a2..7d74982 100644 --- a/Global.R +++ b/dev/Global.R @@ -1,9 +1,8 @@ +################################################################################ +# All functions for plateflow +################################################################################ -Dat <- reactiveValues() -REP <- reactiveValues() -REPlin <- reactiveValues() - #' Levenberg Marquard fit of 4 pl #' #' Returns list of following: summary of restricted and unrestricted model fits of the 4pl function, @@ -110,6 +109,35 @@ Fitting_FUNC <- function(ro_new, TransFlag=F) { return(list(s_mr, Sum_u, pot_est, potU_est, PRED, PREDu)) } + +#' Plot when the fitting has a singularity +#' +#' Returns the scatter plot of the data, with REF in blue and TEST in red. +#' One plots are returned. +#' +#' @param dat The dilution series readouts for REF and TEST + 1 column log(loncentration) or concentration. +#' @returns A grid object with 2 linearity plots, restricted and unrestricted model. +#' @export +#' @examples +#' data.frame(R_dil1 = c(10.0651024695491, 10.9844983291817, 10.7635586089293, 10.4597656321327, 10.3898668457823, 10.8171761349909, +#' 10.319758021908, 10.1304854046653), +#' R_dil2 = c(10.9649145494504, 10.0202868589385, 10.8424145955735, 10.9311360356894, 10.3284659026404, +#' 10.6890147558796, 10.3014450252305, 10.9594838595181), +#' R_dil3 = c(10.4630510824383, 10.4566715089363, 10.2350765290036, 10.3300581874798, 10.9648088137065, +#' 10.286893755805, 10.4856643841389, 10.5275521552307), +#' T_dil1 = c(12.732175566336, 12.7756403995095, 12.1672539684741, 12.7060603907892, 12.8000685682832, +#' 12.8800092157515, 12.7160581291873, 12.6996878912416), +#' T_dil2 = c(12.3923194313831, 12.0943488144175, 12.7955302154828, 12.4825917078735, 12.6856540203788, +#' 12.7348548498556, 12.9222470610476, 12.1186618671252), +#' T_dil3 = c(12.7899182255274, 12.9722600411128, 12.7078445380891, 12.4913523531941, 12.1718281909609, +#' 12.5313873615133, 12.952802332772, 12.5960321394342), +#' log_dose = c(0, -1.09861228866811, -2.19722457733622, -3.29583686600433, -4.39444915467244, +#' -5.49306144334055, -6.59167373200866, -7.69028602067677)) +#' +#' +#' p <- plotSingularity(dat) +#' print(p) +#' plotSingularity <- function(dat) { #sigmoid,det_sig, CORdat <- cor(dat[,1],dat[,ncol(dat)]) #browser() diff --git a/app.R b/dev/app.R similarity index 99% rename from app.R rename to dev/app.R index 94f96d4..9069e9b 100644 --- a/app.R +++ b/dev/app.R @@ -1,3 +1,10 @@ +################################################################################ +# 4PL and Linear bioassay evaluation +# Author: Franz Innerbichler +# 1.4.2026 +################################################################################ + + library(shiny) library(shinydashboard) library(shinyjs) @@ -21,10 +28,6 @@ library(dplyr) library(scales) -#### reactive values ---- -Dat <- reactiveValues() -REP <- reactiveValues() -REPlin <- reactiveValues() source("Global.R") @@ -76,8 +79,12 @@ ui <- dashboardPage( #### server ---- server <- function(input, output, session) { - ReportParS <- reactiveValues() - IPReportParS <- reactiveValues() + + #### reactive values ---- + Dat <- reactiveValues() + REP <- reactiveValues() + REPlin <- reactiveValues() + #### renderUIs ---- output$homePage <- renderUI({ @@ -85,7 +92,7 @@ server <- function(input, output, session) { tabPanel("Limit setting", tags$img(src="logo.png", class="adv_logo"), h4("Introduction to the bioassay software"), - tags$mark("linear regression"), br(), + #tags$mark("linear regression"), br(), column(3, tags$table(id="dose-table", numericInput("lEACdiffla","lower EAC for diff. of LA", -0.175, step=0.001), diff --git a/dev/www/ExampleXL.pdf b/dev/www/ExampleXL.pdf new file mode 100644 index 0000000..6abeaf3 Binary files /dev/null and b/dev/www/ExampleXL.pdf differ diff --git a/dev/www/ExampleXL.png b/dev/www/ExampleXL.png new file mode 100644 index 0000000..6286b05 Binary files /dev/null and b/dev/www/ExampleXL.png differ diff --git a/dev/www/TestFile.numbers b/dev/www/TestFile.numbers new file mode 100644 index 0000000..b0fdd21 Binary files /dev/null and b/dev/www/TestFile.numbers differ diff --git a/dev/www/TestFile.xlsx b/dev/www/TestFile.xlsx new file mode 100644 index 0000000..075eb1e Binary files /dev/null and b/dev/www/TestFile.xlsx differ diff --git a/dev/www/Testsdfac0.2b_3Dil12.numbers b/dev/www/Testsdfac0.2b_3Dil12.numbers new file mode 100644 index 0000000..0a28439 Binary files /dev/null and b/dev/www/Testsdfac0.2b_3Dil12.numbers differ diff --git a/dev/www/logo.png b/dev/www/logo.png new file mode 100644 index 0000000..c6a6fc3 Binary files /dev/null and b/dev/www/logo.png differ diff --git a/tests/ADCC1_2 F-tests.pages b/tests/ADCC1_2 F-tests.pages new file mode 100644 index 0000000..2ebee87 Binary files /dev/null and b/tests/ADCC1_2 F-tests.pages differ diff --git a/tests/EQ tests GHZ1_2.pages b/tests/EQ tests GHZ1_2.pages new file mode 100644 index 0000000..df5dcbe Binary files /dev/null and b/tests/EQ tests GHZ1_2.pages differ diff --git a/tests/TestFLinADCC1CYB.xlsx b/tests/TestFLinADCC1CYB.xlsx new file mode 100644 index 0000000..64af664 Binary files /dev/null and b/tests/TestFLinADCC1CYB.xlsx differ diff --git a/tests/TestFLinADCC2_CYB.xlsx b/tests/TestFLinADCC2_CYB.xlsx new file mode 100644 index 0000000..168ce1d Binary files /dev/null and b/tests/TestFLinADCC2_CYB.xlsx differ diff --git a/tests/plotSingularityTest.png b/tests/plotSingularityTest.png new file mode 100644 index 0000000..2b7a74c Binary files /dev/null and b/tests/plotSingularityTest.png differ diff --git a/www/TestFile.numbers b/www/TestFile.numbers new file mode 100644 index 0000000..b0fdd21 Binary files /dev/null and b/www/TestFile.numbers differ