Commit 80a3a474 authored by jlopez's avatar jlopez
Browse files

Fix github packages

parent 63d36487
......@@ -57,7 +57,6 @@ server <- function( input, output, session) {
}
i = i + 1
}
print(allBIOCONTAINER)
hide("downloadContainerFile")
......
......@@ -44,9 +44,10 @@ tabHome = fluidPage(align="left",
tabPanel('Github',
textInput("inputGithub", "Package name:", ""),
actionButton("findGithub", label = "Find", icon("paper-plane"), style="color: #fff; background-color: #337ab7; border-color: #2e6da4"),
div(id = "formGithub",
selectizeInput('rgithubpackagelist', 'R Github selected:', choices = NULL, multiple=TRUE, options = list(maxItems = 30000)),
br(), br(),
DT::dataTableOutput('dtrgithubpackage')),
DT::dataTableOutput('dtrgithubpackage'))),
tabPanel('BioContainer tools',
div(id = "formContainer",
selectizeInput('selectedBiocontainer', 'Biocontainer tools selected:', choices = NULL, multiple=TRUE, options = list(maxItems = 30000))),
......
......@@ -154,7 +154,7 @@ createContentFile <- function() {
}
}
print(listRCRAN)
result <- paste(result, listRCRAN, sep = "\n")
}}
......@@ -190,35 +190,55 @@ createContentFile <- function() {
result <- paste(result, "\n", sep = "\n")
selectGITHUB <- allGITHUB[input$dtrgithubpackage_rows_all,]
selectGITHUB <- selectGITHUB[,"Package"]
sizeGITHUB <- length(selectGITHUB)
if(!is.null(sizeGITHUB)) {
if(sizeGITHUB < length(allGITHUB[,"Package"])) {
if(sizeGITHUB >= 1) {
if(!is.null(input$rgithubpackagelist)) {
selectGithub <- input$rgithubpackagelist
sizeGITHUB <- length(selectGithub)
if(sizeGITHUB >= 1) {
listRGITHUB <- '\tR --slave -e "install_github(c('
for (pkg in 1:sizeGITHUB){
if(pkg < sizeGITHUB) {
listRGITHUB <- paste0(listRGITHUB, '\'',selectGITHUB[pkg],'\', ')
} else {
listRGITHUB <- paste0(listRGITHUB, '\'',selectGITHUB[pkg],'\'))"')
}
if(pkg < sizeGITHUB) {
listRGITHUB <- paste0(listRGITHUB, '\'',selectGithub[pkg],'\', ')
} else {
listRGITHUB <- paste0(listRGITHUB, '\'',selectGithub[pkg],'\'))"')
}
}
result <- paste(result, listRGITHUB, sep = "\n")
}
}
}
# selectGITHUB <- allGITHUB[input$dtrgithubpackage_rows_all,]
# selectGITHUB <- selectGITHUB[,"Package"]
# sizeGITHUB <- length(selectGITHUB)
# if(!is.null(sizeGITHUB)) {
# if(sizeGITHUB < length(allGITHUB[,"Package"])) {
# if(sizeGITHUB >= 1) {
#
# listRGITHUB <- '\tR --slave -e "install_github(c('
# for (pkg in 1:sizeGITHUB){
# if(pkg < sizeGITHUB) {
# listRGITHUB <- paste0(listRGITHUB, '\'',selectGITHUB[pkg],'\', ')
# } else {
# listRGITHUB <- paste0(listRGITHUB, '\'',selectGITHUB[pkg],'\'))"')
# }
# }
# result <- paste(result, listRGITHUB, sep = "\n")
# }
# }
# }
} #END R
print(input$selectedBiocontainer)
if(!is.null(input$selectedBiocontainer)) {
......@@ -336,29 +356,60 @@ observe({
}
})
observeEvent(input$dtrgithubpackage_rows_selected, {
selectGITHUB <- allGITHUB[input$dtrgithubpackage_rows_selected,]
selectGITHUB <- selectGITHUB[,"Package"]
if(is.null(input$rgithubpackagelist)) {
element <- selectGITHUB
} else {
element <- selectGITHUB
observe({
if(is.null(input$dtrgithubpackage_rows_selected)) {
selectGithub <- input$rgithubpackagelist
sizeGITHUB <- length(selectGithub)
for(x in input$rgithubpackagelist) {
de <- list(Package=x)
element = rbind(element,de)
if(sizeGITHUB < 1) {
shinyjs::reset("formGithub")
}
} else {
i = 1
selectG <- list()
for(x in input$dtrgithubpackage_rows_selected) {
selectG[i] = toString(allGITHUB$Package[[x]])
i = i + 1
}
selectG <- c(unlist(selectG))
}
selectGithub <- input$rgithubpackagelist
sizeGITHUB <- length(selectGithub)
if(sizeGITHUB > 1) {
selectG <- c(selectG, selectGithub)
}
updateSelectizeInput(session,"rgithubpackagelist", choices = element, selected = element, options = list())
updateSelectizeInput(session,"rgithubpackagelist", choices = selectG, selected = selectG, options = list())
}
})
#observeEvent(input$dtrgithubpackage_rows_selected, {
#
#
#
# selectGITHUB <- allGITHUB[input$dtrgithubpackage_rows_selected,]
# selectGITHUB <- selectGITHUB[,"Package"]
#
# if(is.null(input$rgithubpackagelist)) {
# element <- selectGITHUB
# } else {
# element <- selectGITHUB
#
# for(x in input$rgithubpackagelist) {
# de <- list(Package=x)
# element = rbind(element,de)
# }
#
# }
#
# updateSelectizeInput(session,"rgithubpackagelist", choices = element, selected = element, options = list())#
#
#})
observeEvent(input$findGithub, {
name <- input$inputGithub
......
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