Commit 58c7ea13 authored by jlopez's avatar jlopez
Browse files

Fix biocontainer

parent 88501d53
......@@ -37,14 +37,14 @@ getBioconductorPackage <- function() {
i=1
for (tools in data) {
if(length(tools$install) > 0) {
#if(length(tools$install) > 0) {
Tool[i] = tools$name
Version[i] = tools$version
Description[i] = tools$description
Link[i] = paste0("<a href='", tools$documentation, "'>documentation</a>")
i = i + 1
}
#}
}
# Link = c("<a href='https://github.com/r78v10a07/DiffExpIR'>documentation</a>",
......@@ -70,10 +70,16 @@ getInstallToolPackageBioContainer <- function(tool) {
intalls <- ""
for (tools in data) {
if(tools$name == tool) {
res <- paste0("\t", tools$install, collapse='\n' )
return(res)
}
splitB <- strsplit(tool, "%")
name <- splitB[[1]][1]
version <- splitB[[1]][2]
if(tools$name == name) {
if(tools$version == version) {
res <- paste0("\t", tools$install, collapse='\n' )
return(res)
}
}
}
return("\t")
......
......@@ -33,8 +33,6 @@ UI <- dashboardPage(
)
)
server <- function( input, output, session) {
source("https://bioconductor.org/biocLite.R")
......@@ -47,6 +45,7 @@ server <- function( input, output, session) {
allCRAN <<- as.data.frame(getPackagesWithTitle())
allBIO <<- as.data.frame(available.packages(repo = biocinstallRepos()[1])[, c("Package", "Version")])
allGITHUB <<- data.frame(Package=character(), Version=character())
allBIOCONTAINER <<- yaml.load_file("container.yaml")$containers
hide("downloadContainerFile")
......
......@@ -48,6 +48,8 @@ tabHome = fluidPage(align="left",
br(), br(),
DT::dataTableOutput('dtrgithubpackage')),
tabPanel('BioContainer tools',
div(id = "formContainer",
selectizeInput('selectedBiocontainer', 'Biocontainer tools selected:', choices = NULL, multiple=TRUE, options = list(maxItems = 30000))),
DT::dataTableOutput('dtbiocontainer')
)
)
......
......@@ -218,12 +218,20 @@ createContentFile <- function() {
} #END R
if(!is.null(input$dtbiocontainer_rows_all)) {
print(input$selectedBiocontainer)
if(!is.null(input$selectedBiocontainer)) {
#if(!is.null(input$dtbiocontainer_rows_all)) {
biotools = getBioconductorPackage()
#biotools = getBioconductorPackage()
selectBioTool<- biotools[input$dtbiocontainer_rows_all,]
selectBioTool <- selectBioTool[,"BioContainer_Tool"]
#selectBioTool <- biotools[input$dtbiocontainer_rows_all,]
selectBioTool <- input$selectedBiocontainer
#result <- paste(result, "\tmv /etc/apt/sources.list /etc/apt/sources.list.bkp && \\",
# "\techo -e \"deb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted universe multiverse\\n\\ ",
......@@ -273,6 +281,8 @@ createContentFile <- function() {
result <- paste0(result, "\n")
for (tool in selectBioTool){
result <- paste(result, getInstallToolPackageBioContainer(tool), sep="\n\n")
......@@ -310,6 +320,22 @@ output$downloadContainerFile <- downloadHandler(
}
)
observe({
if(is.null(input$dtbiocontainer_rows_selected)) {
shinyjs::reset("formContainer")
} else {
i = 1
selectBiocontainer <- list()
for(x in input$dtbiocontainer_rows_selected) {
selectBiocontainer[i] = paste(allBIOCONTAINER[[x]]$name, allBIOCONTAINER[[x]]$version, sep = "%")
i = i + 1
}
selectBiocontainer <- c(unlist(selectBiocontainer))
updateSelectizeInput(session,"selectedBiocontainer", choices = selectBiocontainer, selected = selectBiocontainer, options = list())
}
})
observeEvent(input$dtrgithubpackage_rows_selected, {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment