Skip to content

Commit

Permalink
merge magic
Browse files Browse the repository at this point in the history
  • Loading branch information
lpantano committed Jul 25, 2024
2 parents 48f1b44 + 271086e commit 4c723f1
Show file tree
Hide file tree
Showing 28 changed files with 1,878 additions and 176 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ docs
/doc/
/Meta/
.DS*
inst/rmarkdown/templates/rnaseq/skeleton/DE/Multiplicative_DGE_Analysis.Rmd
tests/*
.Rdata
.httr-oauth
.DS_Store
.quarto
9 changes: 7 additions & 2 deletions DESCRIPTION
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.
Expand All @@ -20,8 +20,13 @@ Imports:
grDevices,
R.utils,
readr,
fs,
withr
usethis,
fs,
jsonlite,
yaml,
whisker,
rlang
Suggests:
knitr,
rmarkdown,
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ export(cb_friendly_pal)
export(list_cb_friendly_cols)
export(scale_color_cb_friendly)
export(scale_fill_cb_friendly)
export(use_bcbio_projects)
import(DESeq2)
import(R.utils)
import(fs)
import(ggplot2)
import(ggprism)
import(hues)
import(usethis)
importFrom(grDevices,colorRampPalette)
importFrom(magrittr,"%>%")
importFrom(readr,read_csv)
Expand Down
51 changes: 51 additions & 0 deletions R/app.R
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)
2 changes: 2 additions & 0 deletions R/bcbioR-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
## usethis namespace: end
#' @import DESeq2
#' @import ggplot2
#' @import usethis
#' @import fs
#' @import hues
#' @import ggprism
#' @import R.utils
Expand Down
167 changes: 0 additions & 167 deletions R/hello.R

This file was deleted.

Loading

0 comments on commit 4c723f1

Please sign in to comment.