Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanse committed Nov 29, 2023
1 parent 3b9cf3f commit 4e50744
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Authors@R: c(person("Christian", "Trachsel",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-1975-3064")))
Maintainer: Christian Panse <[email protected]>
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 <https://fgcz-bfabric.uzh.ch> system
using WSDL and REST. Also, the package contains shiny
Expand Down
10 changes: 10 additions & 0 deletions R/ms_queue.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)){

Expand Down Expand Up @@ -723,6 +724,7 @@ generate_queue_order <- function(x,
method = method,
pathprefix = pathprefix,
pathprefixsep = pathprefixsep,
acquisitionType = acquisitionType,
order = order,
startpos = startpos)
print(res$nextpos)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
Expand Down
39 changes: 25 additions & 14 deletions inst/shiny/queue_generator10/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(({
Expand Down Expand Up @@ -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'])
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion inst/shiny/queue_generator10/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4e50744

Please sign in to comment.