Skip to content

Commit

Permalink
test app added
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-sahu committed Feb 21, 2020
1 parent 9ee134d commit 07675f6
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ Anyway this [codingene/bioshiner] made on top of [rocker/shiny] only and loosely
|-------|------|
| codingene/bioshiner:3.10 | Bioconductor:3.10 |

## Test
Clone this repository containing test app
```
git clone https://github.com/codingene/BioShineR
```

Run the app
```
docker run --rm -p 3838:3838 \
-v ${PWD}/bioshiner/test/apps/biocmanager:/srv/shiny-server/ \
-v /srv/shinylog/:/var/log/shiny-server/ \
codingene/bioshiner:3.10
```
Open the app in browser: http://localhost:3838/

[R Shiny]: https://shiny.rstudio.com/
[Shiny-Server]: https://rstudio.com/products/shiny/shiny-server/
[Bioconductor]: https://www.bioconductor.org/
Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

17 changes: 17 additions & 0 deletions test/apps/biocmanager/server.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
library(shiny)
library(BiocManager)

shinyServer(function(input, output) {

output$selected_func <- renderText({
if (input$func == "version"){
paste( "BiocManager Version:", as.character(BiocManager::version()))
} else if (input$func == "repositories"){
paste("Current Bioconductor and CRAN repositories")
BiocManager::repositories()
} else {
print("Not functions selected")
}
})

})
18 changes: 18 additions & 0 deletions test/apps/biocmanager/ui.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
library(shiny)

shinyUI(fluidPage(

titlePanel("BiocManager Test"),

sidebarLayout(
sidebarPanel(
selectInput("func", "Function:",
c("Version" = "version",
"Repositories" = "repositories")
)),

mainPanel(
textOutput("selected_func")
)
)
))

0 comments on commit 07675f6

Please sign in to comment.