-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,878 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: bcbioR | ||
Type: Package | ||
Title: Templates and functions to guide downstream analysis and data interpretation | ||
Version: 0.1.3 | ||
Version: 0.2.0 | ||
Authors@R: person("Pantano", "Lorena", , "[email protected]", | ||
role = c("aut", "cre")) | ||
Description: Collaborative code repository at the Harvard Chan Bioinformatics Core. | ||
|
@@ -20,8 +20,13 @@ Imports: | |
grDevices, | ||
R.utils, | ||
readr, | ||
fs, | ||
withr | ||
usethis, | ||
fs, | ||
jsonlite, | ||
yaml, | ||
whisker, | ||
rlang | ||
Suggests: | ||
knitr, | ||
rmarkdown, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Global variables can go here | ||
library(stringr) | ||
.fix <- function(x){ | ||
x <- tolower(x) | ||
x <- str_replace_all(x, "[[:punct:]]", "_") | ||
x <- str_replace_all(x, " ", "_") | ||
return(x) | ||
} | ||
|
||
|
||
# Define the UI | ||
ui <- fluidPage( | ||
# Application title | ||
titlePanel("Create project name"), | ||
|
||
sidebarLayout( | ||
# Sidebar with a slider and selection inputs | ||
sidebarPanel( | ||
textInput('hbc', 'hbc-code (no letters)', value = "00000"), | ||
textInput('pi', 'What is PI last name:', value = "lastname"), | ||
textInput('scientist', 'What is the scientist last name:', value = "scientist"), | ||
textInput('tech', 'What is the technology:', value = "rnaseq"), | ||
textInput('tissue', 'What is the tissue:', value = "mix|cells|heart"), | ||
textInput('org', 'What is the organism:', value = "mix|human"), | ||
textInput('proj', 'What is the project name:', value = "this_analysis_is_cool"), | ||
|
||
), | ||
|
||
# Show Word Cloud | ||
mainPanel( | ||
br("Suggested project name:"), | ||
br(), | ||
verbatimTextOutput('project') | ||
) | ||
) | ||
) | ||
|
||
|
||
# Define the server code | ||
server <- function(input, output, session) { | ||
output$project <- renderText({ | ||
hbc_code <- paste0("hbc", input$hbc) | ||
project_full <- paste(input$tech, .fix(input$pi), .fix(input$scientist), | ||
.fix(input$proj), | ||
input$tissue, input$org, hbc_code, sep="_") | ||
project_full | ||
}) | ||
} | ||
|
||
# Return a Shiny app object | ||
shinyApp(ui = ui, server = server) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.