Pro Yearly is on sale from $80 to $50! »

making-bioc-packages-with-biocthis

 making-bioc-packages-with-biocthis

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

7382f7fe30561274624635116513ca37?s=128

Leonardo Collado-Torres

September 10, 2020
Tweet

Transcript

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

    Collado Torres lcolladotor.github.io https://speakerdeck.com/lcolladotor/making-bioc-packages-with-biocthis
  2. R functions: why? • Avoid copy-paste errors • Facilitate maintenance

    • Building blocks for expanding your universe https://twitter.com/LIBDrstats/status/1294355117916000258?s=20
  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: http://bioconductor.org/developers/package-guidelines/ • Building

    Tidy Tools workshop by Charlotte & Hadley Wickham (RStudio) • R packages book by Hadley Wickham & Jenny Bryan https://r-pkgs.org/ • Bioconductor submission steps http://bioconductor.org/developers/package-submission/
  6. usethis: helpful framework for making R packages • https://usethis.r-lib.org/ •

    usethis::create_package() https://usethis.r-lib.org/reference/create _package.html
  7. GitHub Actions • Saves you time • Enables automatically testing

    your package on winOS, macOS, linux, docker ◦ https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-run ners • Reproducible framework ◦ Particularly when you use docker http://bioconductor.org/help/docker/ ◦ powered by https://www.rocker-project.org/ • But it’s also cutting edge ◦ You might run into the latest R issues ◦ Might need to figure out how to install • https://github.com/r-lib/actions • https://www.jimhester.com/talk/2020-rsc-github-actions/
  8. biocthis: helps jumpstart this process • Includes a GitHub Actions

    workflow that is Bioconductor-friendly ◦ https://lcolladotor.github.io/biocthis/reference/use_bioc_github_action.html ◦ 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) ◦ https://lcolladotor.github.io/biocthis/reference/use_bioc_vignette.html 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 • https://github.com/LieberInstitute/recount3 • http://research.libd.org/recount3/ • http://research.libd.org/recount3/reference/create_rse.html • Bookdown:

    http://research.libd.org/SPEAQeasy/ • R Markdown site: https://lcolladotor.github.io/twitter-stats/CDSB2020.html • More? https://lcolladotor.github.io/pkgs/
  10. Developing on Windows? • https://github.com/r-lib/pkgdown/issues/1329 now at https://github.com/r-lib/pkgdown/issues/1365 related to

    https://twitter.com/jimhester_/status/1296469378062589952?s=20 • 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 • https://twitter.com/LIBDrstats • Twitter zoom links: https://twitter.com/search?q=from%3Alibdrstats%20jh.zoom.us&src=type d_query&f=live