Skip to content
Snippets Groups Projects
Unverified Commit aed8e27b authored by Todor Kondic's avatar Todor Kondic
Browse files

Track file table with a reactive value

parent 7e1b0c96
No related branches found
No related tags found
No related merge requests found
...@@ -516,20 +516,8 @@ mkUI2 <- function() { ...@@ -516,20 +516,8 @@ mkUI2 <- function() {
## ***** Prescreening ***** ## ***** Prescreening *****
## QA
QANms<-names(QANAMES)
## tags<-
## tabPanelList <- lapply(tags, function(tag) {
## shiny::tabPanel(tag, shiny::checkboxGroupInput(paste("spectProps",tag,sep=""), "Quality Control",
## QANms),
## shiny::textAreaInput(paste("caption",tag,sep=""), "Comments:", "Insert your comment here..."),
## shiny::verbatimTextOutput(paste("value",tag,sep=""))
## )})
## nvPanel <- do.call(shiny::navlistPanel, tabPanelList)
## Prescreening elements ## Prescreening elements
preshead <- shinydashboard::dashboardHeader(title = "Prescreening") preshead <- shinydashboard::dashboardHeader(title = "Prescreening")
presCompInfo <- shiny::fluidRow(shinydashboard::box(title = "MS Prescreening", presCompInfo <- shiny::fluidRow(shinydashboard::box(title = "MS Prescreening",
...@@ -790,7 +778,8 @@ shinyScreenApp <- function(projDir=getwd()) { ...@@ -790,7 +778,8 @@ shinyScreenApp <- function(projDir=getwd()) {
currSet=NA, currSet=NA,
currIDSel=1, currIDSel=1,
currIDSet=list(), currIDSet=list(),
fnFT=NULL) fnFT=NULL,
fTab=NULL)
rvCmpList<- shiny::reactiveValues(df=mk_cmpList()) rvCmpList<- shiny::reactiveValues(df=mk_cmpList())
rvSetId<- shiny::reactiveValues(df=mk_setId()) rvSetId<- shiny::reactiveValues(df=mk_setId())
...@@ -1172,6 +1161,15 @@ shinyScreenApp <- function(projDir=getwd()) { ...@@ -1172,6 +1161,15 @@ shinyScreenApp <- function(projDir=getwd()) {
if (x<=len) rvConf$currIDSel<-x if (x<=len) rvConf$currIDSel<-x
}) })
shiny::observeEvent(rvConf$fnFT,{
fn<-rvConf$fnFT
if (!is.null(fn)) {
rvConf$fTab<-read.csv(file=fn,
comment.char = '',
stringsAsFactors = F)
}
})
shiny::observe({ shiny::observe({
shiny::updateSelectInput(session=session, shiny::updateSelectInput(session=session,
inputId="presSelCmpd", inputId="presSelCmpd",
...@@ -1208,16 +1206,11 @@ shinyScreenApp <- function(projDir=getwd()) { ...@@ -1208,16 +1206,11 @@ shinyScreenApp <- function(projDir=getwd()) {
output$nvPanel<-shiny::renderUI({ output$nvPanel<-shiny::renderUI({
fnFT<-rvConf$fnFT ft<-rvConf$fTab
ft<-if (!is.null(fnFT)) {
read.csv(file=fnFT,
stringsAsFactors = F,
comment.char = '')
} else NULL
set<-input$presSelSet set<-input$presSelSet
if (nchar(set)>0 && !is.null(ft)) { if (nchar(set)>0 && !is.null(ft)) {
QANms<-names(rvConf$QANAMES) QANms<-rvConf$QANAMES
names(QANms)<-QANms
tags<-levels(factor(ft[ft$set==set,]$tag)) tags<-levels(factor(ft[ft$set==set,]$tag))
tabPanelList <- lapply(tags, function(tag) { tabPanelList <- lapply(tags, function(tag) {
shiny::tabPanel(tag, shiny::checkboxGroupInput(paste("spectProps",tag,sep=""), "Quality Control", shiny::tabPanel(tag, shiny::checkboxGroupInput(paste("spectProps",tag,sep=""), "Quality Control",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment