Save 37% off PRO during our Black Friday Sale! »



2020-09-10 presentation for Mina Ryten's lab facilitated by David Zhang on "Making R/Bioconductor packages with biocthis; recount3 use case"


Leonardo Collado-Torres

September 10, 2020


  1. Making R/Bioconductor packages with biocthis recount3 use case 2020-09-10 Leonardo

    Collado Torres
  2. R functions: why? • Avoid copy-paste errors • Facilitate maintenance

    • Building blocks for expanding your universe
  3. R packages: why? • Allows you to organize your functions

    • Allows testing your code ◦ testthat ◦ covr ◦ R CMD check ◦ R CMD BiocCheck • Allows sharing your code ◦ remotes::install_github("user/repository") ◦ BiocManager::install("user/repository")
  4. Bioconductor packages: why? • Quality standard: has to pass a

    peer review process ◦ Users will trust more your package • Open source community ◦ You’ll get help from others. Very useful if you don’t have others around you to ask for help • Provides a DOI • Generally helps when publishing • Automatically tested on macOS, linux and winOS every day ◦ Helps anticipate errors users might run into
  5. Where to start? • Bioconductor package guidelines: • Building

    Tidy Tools workshop by Charlotte & Hadley Wickham (RStudio) • R packages book by Hadley Wickham & Jenny Bryan • Bioconductor submission steps
  6. usethis: helpful framework for making R packages • •

    usethis::create_package() _package.html
  7. GitHub Actions • Saves you time • Enables automatically testing

    your package on winOS, macOS, linux, docker ◦ ners • Reproducible framework ◦ Particularly when you use docker ◦ powered by • But it’s also cutting edge ◦ You might run into the latest R issues ◦ Might need to figure out how to install • •
  8. biocthis: helps jumpstart this process • Includes a GitHub Actions

    workflow that is Bioconductor-friendly ◦ ◦ Bioconductor docker + macOS + winOS ◦ R CMD build + check + BiocCheck ◦ covr: code coverage ◦ pkgdown: documentation website • Has functions similar to usethis but that are tailored for Bioconductor’s needs (and/or mine) ◦ creates a BiocStyle-based vignette with a structure that I like to use for my R/Bioconductor packages • Includes 4 dev/*.R scripts that will guide you throughout the process of making your R/BioC package
  9. Examples: recount3 • • • • Bookdown: • R Markdown site: • More?
  10. Developing on Windows? • now at related to • Short version: Windows has multiple “home” directories which makes things a mess
  11. Want more? Check the LIBD rstats club • Friday’s 1pm

    EST. Typically tweet links around 3pm EST • • Twitter zoom links: d_query&f=live