diff --git a/DESCRIPTION b/DESCRIPTION index dd8da40..2b498e1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,7 +7,7 @@ Authors@R: c(person("Christian", "Trachsel", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-1975-3064"))) Maintainer: Christian Panse -Version: 0.12.23 +Version: 0.12.24 Description: provides a shiny module and read, save, and delete functions to interact with the FGCZ's B-Fabric system using WSDL and REST. Also, the package contains shiny diff --git a/R/ms_queue.R b/R/ms_queue.R index af84565..55ac17a 100644 --- a/R/ms_queue.R +++ b/R/ms_queue.R @@ -680,6 +680,7 @@ generate_queue_order <- function(x, method = 'default', pathprefix = "D:\\Data2San", pathprefixsep = "\\", + acquisitionType = "DDA", DEBUG = FALSE, startpos = list(row = 1, col = "A", plate = 1)){ @@ -723,6 +724,7 @@ generate_queue_order <- function(x, method = method, pathprefix = pathprefix, pathprefixsep = pathprefixsep, + acquisitionType = acquisitionType, order = order, startpos = startpos) print(res$nextpos) @@ -836,6 +838,7 @@ generate_queue <- function(x, method = 'default', pathprefix = "D:\\Data2San", pathprefixsep = "\\", + acquisitionType = "DDA", DEBUG = FALSE, order = TRUE, startpos = list(row = 1, col = "A", plate = 1) @@ -953,6 +956,13 @@ generate_queue <- function(x, rv$"Instrument Method"[grep("_autoQC4L", rv$"File Name")] <- "C:\\Xcalibur\\methods\\__autoQC\\trap\\autoQC4L" + ## TODO(cpanse): needs to be refactored some day! + ## 20231129 - replace autoQC4L by autoQC03 in 'File Name' and 'Instrument Method' + idx <- grep("_autoQC4L", rv$"File Name") + rv[idx, 'File Name' ] <- gsub("autoQC4L", paste0("autoQC03", acquisitionType), rv[idx, 'File Name' ]) + rv[idx, 'Instrument Method' ] <- gsub("autoQC4L", paste0("autoQC03", acquisitionType), rv[idx, 'Instrument Method' ]) + rv[idx, 'Sample Name'] <- gsub("autoQC4L", "autoQC03", rv[idx, 'Sample Name' ]) + if (DEBUG) { rv <- merge(rv, x, by.x = "Sample ID", by.y = "extract.id", all = TRUE) } diff --git a/inst/shiny/queue_generator10/server.R b/inst/shiny/queue_generator10/server.R index cbf8420..f3b4c58 100644 --- a/inst/shiny/queue_generator10/server.R +++ b/inst/shiny/queue_generator10/server.R @@ -87,6 +87,16 @@ shinyServer(function(input, output, session) { } })) + output$acquisitionType <- renderUI({ + acquisitionType <- c("DDA", "DIA") + + selectInput('acquisitionType', 'acquisition type:', + acquisitionType , + multiple = FALSE, + selected = acquisitionType[1]) + } + ) + ## ========== output$area output$area <- renderUI(({ @@ -412,7 +422,8 @@ shinyServer(function(input, output, session) { end2 = as.numeric(input$end2), end3 = as.numeric(input$end3), lists = input$targets, - startposition = input$startposition) + startposition = input$startposition, + acquisitionType = input$acquisitionType) # TODO(cp): add an addidtional parameter idx <- rv['Sample Name'] == "autoQC4L" & grepl("EXPLORIS_", rv['Path']) @@ -470,41 +481,41 @@ shinyServer(function(input, output, session) { } print("DEBUG") print(input$autoQC4L) - ## TODO method files only for clean|autoQC4L|autoQC01 + ## TODO method files only for clean|autoQC03|autoQC01 if (input$lcSystem == "EVOSEP1x12x8"){ - rv <- inputSampleTable %>% + rv <- inputSampleTable |> .insertStandardsEVOSEP(stdName = "clean", between=input$clean, howoften = input$cleano, howmany = input$cleanm, volume = 4, - begin = "4" %in% c(input$start1,input$start2, input$start3), - end = "4" %in% c(input$end1,input$end2, input$end3)) %>% + begin = "4" %in% c(input$start1, input$start2, input$start3), + end = "4" %in% c(input$end1,input$end2, input$end3)) |> .insertStandardsEVOSEP(stdName = "autoQC01", between=input$autoQC01, howoften = input$QC01o, howmany = input$QC01m, - begin = "1" %in% c(input$start1,input$start2, input$start3), - end = "1" %in% c(input$end1,input$end2, input$end3)) %>% + begin = "1" %in% c(input$start1, input$start2, input$start3), + end = "1" %in% c(input$end1, input$end2, input$end3)) |> .insertStandardsEVOSEP(stdName = "autoQC02", between=input$autoQC02, howoften = input$QC02o, howmany = input$QC02m, begin = "2" %in% c(input$start1,input$start2, input$start3), - end = "2" %in% c(input$end1,input$end2, input$end3)) %>% - .insertStandardsEVOSEP(stdName = "autoQC4L", + end = "2" %in% c(input$end1,input$end2, input$end3)) |> + .insertStandardsEVOSEP(stdName = paste0("autoQC03", input$acquisitionType), between=input$autoQC4L, howoften = input$QC4Lo, howmany = input$QC4Lm, begin = "3" %in% c(input$start1,input$start2, input$start3), - end = "3" %in% c(input$end1,input$end2, input$end3), volume = 2) %>% - .mapPlatePositionEVOSEP(volume = 1) %>% + end = "3" %in% c(input$end1,input$end2, input$end3), volume = 2) |> + .mapPlatePositionEVOSEP(volume = 1) |> .formatHyStar(dataPath = paste0("D:\\Data2San\\p", input$container, "\\", input$area, "\\", input$instrument, "\\", input$login,"_",format(Sys.Date(), format = "%Y%m%d"), "_", note, "\\"), - Method_Set="D:\\Methods\\autoQC\\evosepOne\\autoQC4L.m", - FUN=function(x,y,plate){paste0("S",plate,"-", y, x)}) + Method_Set = paste0("D:\\Methods\\autoQC\\evosepOne\\autoQC03", input$acquisitionType, ".m"), + FUN = function(x, y, plate){paste0("S", plate, "-", y, x)}) return(rv) }else{ @@ -540,7 +551,7 @@ shinyServer(function(input, output, session) { input$area, "\\", input$instrument, "\\", input$login,"_", format(Sys.Date(), format = "%Y%m%d"), "_", note, "\\"), - Method_Set="D:\\Methods\\autoQC\\nanoElute\\autoQC4L.m", + Method_Set=paste0("D:\\Methods\\autoQC\\nanoElute\\autoQC03", input$acquisitionType,".m"), FUN=function(x, y, plate){paste0( "Slot", plate,":", x)}) #rv <- .blockRandom(rv, x = "sample_condition") diff --git a/inst/shiny/queue_generator10/ui.R b/inst/shiny/queue_generator10/ui.R index 4748dfa..6b8b16c 100644 --- a/inst/shiny/queue_generator10/ui.R +++ b/inst/shiny/queue_generator10/ui.R @@ -33,7 +33,8 @@ shinyUI( tags$h3("LC-MS configuration:"), fluidRow( column(4, htmlOutput("instrumentControlSoftware")), - column(4, htmlOutput("lcSystem")) + column(4, htmlOutput("lcSystem")), + column(4, htmlOutput("acquisitionType")) ), tags$h3("Select options for your queue:"), radioButtons(