Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bcbio/bcbioR
Browse files Browse the repository at this point in the history
  • Loading branch information
abartlett004 committed Apr 19, 2024
2 parents 58c4b98 + 20c0127 commit 001d10f
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 9 deletions.
19 changes: 10 additions & 9 deletions R/hello.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,27 @@
# Test Package: 'Cmd + Shift + T'

.fix <- function(x){
x <- tolower(x) %>% str_replace_all(x, "[[:punct:]]", " ")
retunr(x)
x <- tolower(x) %>% str_replace_all(., "[[:punct:]]", "_")
return(x)
}

#' @export
bcbio_set_project <- function() {
hbc_code <- readline("What is the hbc code:\n")
hbc_code <- paste0("hbc", hbc_code)
pi <- readline("What is PI last name:\n")
technology <- readline("What is the technology:\n")
tissue <- readline("What is the tissue:\n")
org <- readline("What is the organism:\n")
project <- readline("What is the project name:\n")
dropbox <- readline("What is the dropbox name:\n")
github_org <- readline("What is the github organization:\n")
#dropbox <- readline("What is the dropbox name:\n")
#github_org <- readline("What is the github organization:\n")
#hbc_$technology_of_$pilastname_$intervention_on_$tissue_in_$organism_$hbccode
project_full <- paste(project, technology, fix(pi), project, tissue, organism, hbc_code, sep="_")
github <- c(github_org,project_full)
opts <- list(code=hbc_code, project=project_full,
dropbox=file.path(dropbox,project_full),
github=github)
project_full <- paste(technology, .fix(pi), .fix(project), tissue, org, hbc_code, sep="_")
#github <- c(github_org,project_full)
opts <- list(code=hbc_code, project=project_full)
#dropbox=file.path(dropbox,project_full),
#github=github)
print(opts)
return(opts)
}
Expand Down
13 changes: 13 additions & 0 deletions inst/rmarkdown/templates/common/skeleton/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# TODO

[ ] Replace Title in this file matching title projects
[ ] run function`bcbio_set_project()` to set up information for this project
- hbcxxxx code
- technology
- tissue
- organism
- pi
- project name
[ ] run function `bcbio_set_git()` to set up git repository
[ ] run function `bcbio_copy_dropbox()` to copy files to dropbox location

Empty file.
Empty file.
6 changes: 6 additions & 0 deletions inst/rmarkdown/templates/common/skeleton/information.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# info params
project = "name_hbcXXXXX"
PI = 'person name'
experiment = 'short description'
aim = 'short description'
analyst = 'person in the core'
Empty file.
25 changes: 25 additions & 0 deletions inst/rmarkdown/templates/common/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "General Project Information"
author: "Harvard Chan Bioinformatics Core"
date: "`r Sys.Date()`"
output:
html_document:
code_folding: hide
df_print: paged
highlights: pygments
number_sections: true
self_contained: true
theme: default
toc: true
toc_float:
collapsed: true
smooth_scroll: true
editor_options:
chunk_output_type: console
params:
params_file: information.R
---

```{r echo = F}
source(params$params_file)
```
3 changes: 3 additions & 0 deletions inst/rmarkdown/templates/common/template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: bcbio base
description: Standard NGS down-stream analyses
create_dir: true

0 comments on commit 001d10f

Please sign in to comment.