Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jlopez
RPACIB
Commits
58c7ea13
Commit
58c7ea13
authored
Mar 22, 2018
by
jlopez
Browse files
Fix biocontainer
parent
88501d53
Changes
4
Hide whitespace changes
Inline
Side-by-side
R/helper_functions.R
View file @
58c7ea13
...
...
@@ -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"
)
...
...
app.R
View file @
58c7ea13
...
...
@@ -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"
)
...
...
pages/pages_def_home.R
View file @
58c7ea13
...
...
@@ -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'
)
)
)
...
...
server/opt_home.R
View file @
58c7ea13
...
...
@@ -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
<-
selectBio
Tool
[,
"BioC
ontainer
_Tool"
]
#
selectBioTool
<- biotools[input$dtbiocontainer_rows_all,]
selectBioTool
<-
input
$
select
ed
Bio
c
ontainer
#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
,
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment