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

Restoring config now knows how to handle tags

parent 32b30269
No related branches found
No related tags found
No related merge requests found
......@@ -711,6 +711,16 @@ mk_shinyscreen <- function(projDir=getwd(),
NULL
}
txt2tags<-function(txt){
## Turns a string into tags
x <- if (shiny::isTruthy(txt)) {
trimws(unlist(strsplit(txt, ",")))
} else list()
as.list(c("unspecified",x))
}
server <- function(input,output,session) {
......@@ -770,12 +780,7 @@ mk_shinyscreen <- function(projDir=getwd(),
get_all_tags<-shiny::reactive({
## Returns all tags from the input box.
tagsInp<-input$tagsInp
x <- if (shiny::isTruthy(tagsInp)) {
trimws(unlist(strsplit(tagsInp, ",")))
} else list()
as.list(c("unspecified",x))
txt2tags(tagsInp)
})
......@@ -987,6 +992,17 @@ mk_shinyscreen <- function(projDir=getwd(),
for (nm in REST_TAB) {
rvTab[[nm]]<-sav$tab[[nm]]
}
## Restore tags.
mzmlTags <- levels(rvTab$mzml$tag)
currTags <- txt2tags(sav$input[["tagsInp"]])
z <- unique(c(currTags, mzmlTags))
z <- z[z != 'unspecified']
alltags <- do.call(paste,c(as.list(z),sep=','))
shiny::updateTextInput(session=session,
inputId="tagsInp",
value=alltags)
}
})
......@@ -1586,6 +1602,7 @@ mk_shinyscreen <- function(projDir=getwd(),
{
fchoice<-shinyFiles::parseFilePaths(root=volumes,input$mzMLB)
paths<-fchoice[["datapath"]]
shiny::validate(need(rvTab$mzml,"There is no skeleton table. Sets? Tags?"))
rvTab$mzml<-add_mzML_files(rvTab$mzml,paths)
})
......
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