bcbioR quick start
bcbioR_quick_start.Rmd
library(bcbioR)
library(ggplot2)
library(ggprism)
colors=cb_friendly_cols(1:15)
ggplot2::theme_set(theme_prism(base_size = 14))
Color blind friendly palette
Compatible with ggplot
.
set.seed(596)
dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
ggplot(dsamp, aes(carat, price)) +
geom_point(aes(colour = clarity)) +
scale_color_cb_friendly()
And get the colors directly:
cb_friendly_cols(1:16)
#> blue light_orange olive_green purple pink sky_blue
#> "#2759F6" "#FFD37D" "olivedrab3" "#9176C8" "#E93380" "#4FAEEB"
#> blue_grey forest_green yellow dark_purple dark_orange army_green
#> "#92A6BC" "#3C877B" "yellow" "#402999" "#D5392C" "#C3C380"
#> black dark_grey light_blue brown
#> "black" "darkgrey" "lightblue" "#661100"
This is the full palette:
library(hues)
swatch(cb_friendly_cols(1:16))
Set projects
HCBC uses a structured based directory to organize projects. You can set up this by using:
tmp_dir=withr::local_tempdir()
bcbio_templates(type="base", outpath=tmp_dir)
#> ℹ Getting templates from
#> '/home/runner/work/_temp/Library/bcbioR/templates/base'
#> list()
fs::dir_ls(tmp_dir, recurse=TRUE)
#> /tmp/RtmpRzbBTT/file1e135fef037e/README.md
#> /tmp/RtmpRzbBTT/file1e135fef037e/TOC.md
#> /tmp/RtmpRzbBTT/file1e135fef037e/apps
#> /tmp/RtmpRzbBTT/file1e135fef037e/code
#> /tmp/RtmpRzbBTT/file1e135fef037e/code/placeholder.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/data
#> /tmp/RtmpRzbBTT/file1e135fef037e/data/readme
#> /tmp/RtmpRzbBTT/file1e135fef037e/information.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/meta
#> /tmp/RtmpRzbBTT/file1e135fef037e/meta/placeholder.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/example.Rmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/placeholder
#> /tmp/RtmpRzbBTT/file1e135fef037e/scripts
#> /tmp/RtmpRzbBTT/file1e135fef037e/scripts/placeholder
We support multiple analyses type:
- RNAseq
- scRNAseq
- ChipPseq
To get the example code for any of them you can use a similar command:
analysis_tmp=fs::path_join(c(tmp_dir, "reports"))
bcbio_templates(type="rnaseq", outpath=analysis_tmp)
#> ℹ Getting templates from
#> 'https://github.com/bcbio/rnaseq-reports/archive/refs/heads/main.zip'
#> list()
fs::dir_ls(analysis_tmp, recurse=TRUE)
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/00_libs
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/00_libs/FA.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/00_libs/load_data.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/00_params
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/00_params/params-example.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/00_params/params.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/01_quality_assessment
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/01_quality_assessment/quality_assessment.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/01_quality_assessment/render.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/01_quality_assessment/renv.lock
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/02_differential_expression
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/02_differential_expression/GO_similarity.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/02_differential_expression/differential_expression.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/02_differential_expression/render.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/02_differential_expression/renv.lock
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_comparative
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_comparative/Intersections.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_comparative/Pair-wise-comparison-analysis.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_comparative/renv.lock
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/GSVA.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/Immune-deconvolution.Rmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/Immune-deconvolution_human.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/Immune-deconvolution_mouse.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/Nonmodel_Organism_Pathway_Analysis.Rmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/params_immune_deconv.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/params_immune_deconv_human.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/params_immune_deconv_mouse.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/params_nonmodel_org_pathways.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/03_functional/renv.lock
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/04_gene_patterns
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/04_gene_patterns/DEGpattern.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/04_gene_patterns/WGCNA.qmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/04_gene_patterns/params_de-example.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/04_gene_patterns/renv.lock
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/Dockerfile
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/README.md
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/apps
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/example.Rmd
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/information.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/install_dependencies.R
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/pixi.lock
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/pixi.toml
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/placeholder
#> /tmp/RtmpRzbBTT/file1e135fef037e/reports/ubuntu.R
Use scrnaseq
, teaseq
or cosmx
to get those other templates.