Skip to contents

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:

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/RtmpkXs5S4/file17d25e2b5247/README.md
#> /tmp/RtmpkXs5S4/file17d25e2b5247/apps
#> /tmp/RtmpkXs5S4/file17d25e2b5247/code
#> /tmp/RtmpkXs5S4/file17d25e2b5247/code/placeholder.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/data
#> /tmp/RtmpkXs5S4/file17d25e2b5247/data/readme
#> /tmp/RtmpkXs5S4/file17d25e2b5247/information.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/meta
#> /tmp/RtmpkXs5S4/file17d25e2b5247/meta/placeholder.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/example.Rmd
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/placeholder
#> /tmp/RtmpkXs5S4/file17d25e2b5247/scripts
#> /tmp/RtmpkXs5S4/file17d25e2b5247/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
#> '/home/runner/work/_temp/Library/bcbioR/templates/rnaseq'
#> list()
fs::dir_ls(analysis_tmp, recurse=TRUE)
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/DE
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/DE/Cross-comparison-analysis.Rmd
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/DE/DEG.Rmd
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/DE/GSVA.Rmd
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/DE/Intersections.Rmd
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/DE/params_de-example.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/DE/params_de.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/DE/run_markdown.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/QC
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/QC/QC-bcbio.Rmd
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/QC/QC_nf-core.Rmd
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/QC/params_qc.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/QC/params_qc_nf-core-example.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/QC/params_qc_nf-core.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/QC/run_markdown.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/README.md
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/apps
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/example.Rmd
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/information.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/libs
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/libs/FA.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/libs/load_data.R
#> /tmp/RtmpkXs5S4/file17d25e2b5247/reports/placeholder

Use scrnaseq, teaseq or cosmx to get those other templates.