Overview

Here you can find the files for the February 2023 introduction to R, RStudio and RNA-sequencing (RNA-seq) course for LCG-UNAM at CCG-UNAM (January 31 - February 3, 2023). The rest of the chapters will be in Spanish.

Instructor:

Teach assistants:

Guest presenters:

Course Coordinators:

  • Heladia Salgado
  • Julio Collado Vides

Download the materials for this course with usethis::use_course('lcolladotor/rnaseq_LCG-UNAM_2023') or view online at lcolladotor.github.io/rnaseq_LCG-UNAM_2023.

Code of Conduct

We’ll follow the CDSB code of conduct comunidadbioinfo.github.io/codigo-de-conducta/ as well as version 1.2.0 of the Bioconductor code of conduct bioconductor.github.io/bioc_coc_multilingual/.

For reporting any violations of the code of conduct, report them to the Instructor and/or Course Coordinators.

Course Schedule

Local times in Cuernavaca, Mexico

Course Prerequisites

Install R 4.2.x from CRAN then install the following R packages:

## For installing Bioconductor packages
if (!requireNamespace("BiocManager", quietly = TRUE)) {
    install.packages("BiocManager")
}

## Install required packages
BiocManager::install(
    c(
        "usethis", ## Utilities
        "here",
        "biocthis",
        "lobstr",
        "postcards",
        "sessioninfo",
        "SummarizedExperiment", ## Main containers / vis
        "iSEE",
        "edgeR", ## RNA-seq
        "ExploreModelMatrix",
        "limma",
        "recount3",
        "pheatmap", ## Visualization
        "ggplot2",
        "patchwork",
        "RColorBrewer",
        "ComplexHeatmap",
        "spatialLIBD" ## Advanced
    )
)

You will also need to install RStudio version 2022.12.0+353 or newer.

Course Evaluation

  • Participation
    • (main evidence) written and/or verbal participation during class
    • (optional, strongly encouraged for your own career) Community building: CDSB Slack (introduce yourself), Twitter, GitHub, etc.
  • Public work
    • (main evidence) Taking notes on GitHub
    • (optional) Deploy an iSEE shiny app on shinyapps.io
    • (advanced and optional) R package with notes following usethis::create_package() + biocthis::use_bioc_pkg_templates().
  • Final project
    • (main evidence) code in a public GitHub repository (different from the notes one) following the structure from LieberInstitute/template_project
    • (optional) a rendered Rmd file (RPubs, GitHub, etc) on a public URL
    • (optional advanced) Copy this repository, remove all the Rmds except the index.Rmd and edit accordingly. GitHub Actions will then help you render it. You’ll need to fetch the gh-pages branch and at least make one commit for the HTML to be available such as this commit. You might also run into this GitHub default permission setting that you’ll need to change.

The final grade will be a weighted average from the evaluation by the TA (20%), your public work (40%) and your final project (40%).

Projects, public work and notes are due at 9 am US Eastern on Monday February 13th, though we recommend doing any work related to this course by Friday February 10th.

R session information

Details on the R version used for making this book. The source code is available at lcolladotor/rnaseq_LCG-UNAM_2023.

## Load the package at the top of your script
library("sessioninfo")

##  Utilities
library("BiocStyle")
library("biocthis")
library("here")
library("lobstr")
library("postcards")
library("usethis")
library("sessioninfo")

## Main containers / vis
library("SummarizedExperiment")
library("iSEE")

## RNA-seq
library("edgeR")
library("ExploreModelMatrix")
library("limma")
library("recount3")

## Visualization
library("ComplexHeatmap")
library("ggplot2")
library("patchwork")
library("pheatmap")
library("RColorBrewer")

## Advanced
library("spatialLIBD")
## Reproducibility information
options(width = 120)
session_info()
## ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
##  setting  value
##  version  R version 4.2.2 (2022-10-31)
##  os       Ubuntu 22.04.1 LTS
##  system   x86_64, linux-gnu
##  ui       X11
##  language (EN)
##  collate  en_US.UTF-8
##  ctype    en_US.UTF-8
##  tz       UTC
##  date     2023-02-03
##  pandoc   2.19.2 @ /usr/local/bin/ (via rmarkdown)
## 
## ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
##  package                * version   date (UTC) lib source
##  AnnotationDbi            1.60.0    2022-11-01 [1] Bioconductor
##  AnnotationHub            3.6.0     2022-11-01 [1] Bioconductor
##  assertthat               0.2.1     2019-03-21 [1] CRAN (R 4.2.2)
##  attempt                  0.3.1     2020-05-03 [1] CRAN (R 4.2.2)
##  beachmat                 2.14.0    2022-11-01 [1] Bioconductor
##  beeswarm                 0.4.0     2021-06-01 [1] CRAN (R 4.2.2)
##  benchmarkme              1.0.8     2022-06-12 [1] CRAN (R 4.2.2)
##  benchmarkmeData          1.0.4     2020-04-23 [1] CRAN (R 4.2.2)
##  Biobase                * 2.58.0    2022-11-01 [1] Bioconductor
##  BiocFileCache            2.6.0     2022-11-01 [1] Bioconductor
##  BiocGenerics           * 0.44.0    2022-11-01 [1] Bioconductor
##  BiocIO                   1.8.0     2022-11-01 [1] Bioconductor
##  BiocManager              1.30.19   2022-10-25 [2] CRAN (R 4.2.2)
##  BiocNeighbors            1.16.0    2022-11-01 [1] Bioconductor
##  BiocParallel             1.32.5    2022-12-23 [1] Bioconductor
##  BiocSingular             1.14.0    2022-11-01 [1] Bioconductor
##  BiocStyle              * 2.26.0    2022-11-01 [1] Bioconductor
##  biocthis               * 1.8.1     2022-11-02 [1] Bioconductor
##  BiocVersion              3.16.0    2022-04-26 [2] Bioconductor
##  Biostrings               2.66.0    2022-11-01 [1] Bioconductor
##  bit                      4.0.5     2022-11-15 [1] CRAN (R 4.2.2)
##  bit64                    4.0.5     2020-08-30 [1] CRAN (R 4.2.2)
##  bitops                   1.0-7     2021-04-24 [1] CRAN (R 4.2.2)
##  blob                     1.2.3     2022-04-10 [1] CRAN (R 4.2.2)
##  bookdown                 0.32      2023-01-17 [1] RSPM (R 4.2.0)
##  bslib                    0.4.2     2022-12-16 [2] RSPM (R 4.2.0)
##  cachem                   1.0.6     2021-08-19 [2] RSPM (R 4.2.0)
##  circlize                 0.4.15    2022-05-10 [1] CRAN (R 4.2.2)
##  cli                      3.6.0     2023-01-09 [2] RSPM (R 4.2.0)
##  clue                     0.3-64    2023-01-31 [1] RSPM (R 4.2.0)
##  cluster                  2.1.4     2022-08-22 [3] CRAN (R 4.2.2)
##  codetools                0.2-19    2023-02-01 [3] RSPM (R 4.2.0)
##  colorspace               2.1-0     2023-01-23 [1] RSPM (R 4.2.0)
##  colourpicker             1.2.0     2022-10-28 [1] CRAN (R 4.2.2)
##  ComplexHeatmap         * 2.14.0    2022-11-01 [1] Bioconductor
##  config                   0.3.1     2020-12-17 [1] CRAN (R 4.2.2)
##  cowplot                  1.1.1     2020-12-30 [1] CRAN (R 4.2.2)
##  crayon                   1.5.2     2022-09-29 [2] RSPM (R 4.2.0)
##  curl                     5.0.0     2023-01-12 [2] RSPM (R 4.2.0)
##  data.table               1.14.6    2022-11-16 [1] CRAN (R 4.2.2)
##  DBI                      1.1.3     2022-06-18 [1] CRAN (R 4.2.2)
##  dbplyr                   2.3.0     2023-01-16 [1] RSPM (R 4.2.0)
##  DelayedArray             0.24.0    2022-11-01 [1] Bioconductor
##  DelayedMatrixStats       1.20.0    2022-11-01 [1] Bioconductor
##  desc                     1.4.2     2022-09-08 [2] RSPM (R 4.2.0)
##  digest                   0.6.31    2022-12-11 [2] RSPM (R 4.2.0)
##  doParallel               1.0.17    2022-02-07 [1] CRAN (R 4.2.2)
##  dotCall64                1.0-2     2022-10-03 [1] CRAN (R 4.2.2)
##  dplyr                    1.1.0     2023-01-29 [1] RSPM (R 4.2.0)
##  dqrng                    0.3.0     2021-05-01 [1] CRAN (R 4.2.2)
##  DropletUtils             1.18.1    2022-11-22 [1] Bioconductor
##  DT                       0.27      2023-01-17 [1] RSPM (R 4.2.0)
##  edgeR                  * 3.40.2    2023-01-19 [1] Bioconductor
##  ellipsis                 0.3.2     2021-04-29 [2] RSPM (R 4.2.0)
##  evaluate                 0.20      2023-01-17 [2] RSPM (R 4.2.0)
##  ExperimentHub            2.6.0     2022-11-01 [1] Bioconductor
##  ExploreModelMatrix     * 1.10.0    2022-11-01 [1] Bioconductor
##  fansi                    1.0.4     2023-01-22 [2] RSPM (R 4.2.0)
##  fastmap                  1.1.0     2021-01-25 [2] RSPM (R 4.2.0)
##  fields                   14.1      2022-08-12 [1] CRAN (R 4.2.2)
##  filelock                 1.0.2     2018-10-05 [1] CRAN (R 4.2.2)
##  foreach                  1.5.2     2022-02-02 [1] CRAN (R 4.2.2)
##  fs                       1.6.0     2023-01-23 [2] RSPM (R 4.2.0)
##  generics                 0.1.3     2022-07-05 [1] CRAN (R 4.2.2)
##  GenomeInfoDb           * 1.34.8    2023-02-01 [1] Bioconductor
##  GenomeInfoDbData         1.2.9     2022-12-06 [1] Bioconductor
##  GenomicAlignments        1.34.0    2022-11-01 [1] Bioconductor
##  GenomicRanges          * 1.50.2    2022-12-16 [1] Bioconductor
##  GetoptLong               1.0.5     2020-12-15 [1] CRAN (R 4.2.2)
##  ggbeeswarm               0.7.1     2022-12-16 [1] RSPM (R 4.2.0)
##  ggplot2                * 3.4.0     2022-11-04 [1] CRAN (R 4.2.2)
##  ggrepel                  0.9.2     2022-11-06 [1] CRAN (R 4.2.2)
##  GlobalOptions            0.1.2     2020-06-10 [1] CRAN (R 4.2.2)
##  glue                     1.6.2     2022-02-24 [2] RSPM (R 4.2.0)
##  golem                    0.3.5     2022-10-18 [1] CRAN (R 4.2.2)
##  gridExtra                2.3       2017-09-09 [1] CRAN (R 4.2.2)
##  gtable                   0.3.1     2022-09-01 [1] CRAN (R 4.2.2)
##  HDF5Array                1.26.0    2022-11-01 [1] Bioconductor
##  here                   * 1.0.1     2020-12-13 [1] CRAN (R 4.2.2)
##  htmltools                0.5.4     2022-12-07 [2] RSPM (R 4.2.0)
##  htmlwidgets              1.6.1     2023-01-07 [2] RSPM (R 4.2.0)
##  httpuv                   1.6.8     2023-01-12 [2] RSPM (R 4.2.0)
##  httr                     1.4.4     2022-08-17 [2] RSPM (R 4.2.0)
##  igraph                   1.3.5     2022-09-22 [1] CRAN (R 4.2.2)
##  interactiveDisplayBase   1.36.0    2022-11-01 [1] Bioconductor
##  IRanges                * 2.32.0    2022-11-01 [1] Bioconductor
##  irlba                    2.3.5.1   2022-10-03 [1] CRAN (R 4.2.2)
##  iSEE                   * 2.10.0    2022-11-01 [1] Bioconductor
##  iterators                1.0.14    2022-02-05 [1] CRAN (R 4.2.2)
##  jquerylib                0.1.4     2021-04-26 [2] RSPM (R 4.2.0)
##  jsonlite                 1.8.4     2022-12-06 [2] RSPM (R 4.2.0)
##  KEGGREST                 1.38.0    2022-11-01 [1] Bioconductor
##  knitr                    1.42      2023-01-25 [2] RSPM (R 4.2.0)
##  later                    1.3.0     2021-08-18 [2] RSPM (R 4.2.0)
##  lattice                  0.20-45   2021-09-22 [3] CRAN (R 4.2.2)
##  lazyeval                 0.2.2     2019-03-15 [1] CRAN (R 4.2.2)
##  lifecycle                1.0.3     2022-10-07 [2] RSPM (R 4.2.0)
##  limma                  * 3.54.1    2023-01-26 [1] Bioconductor
##  lobstr                 * 1.1.2     2022-06-22 [1] CRAN (R 4.2.2)
##  locfit                   1.5-9.7   2023-01-02 [1] RSPM (R 4.2.0)
##  magick                   2.7.3     2021-08-18 [1] CRAN (R 4.2.2)
##  magrittr                 2.0.3     2022-03-30 [2] RSPM (R 4.2.0)
##  maps                     3.4.1     2022-10-30 [1] CRAN (R 4.2.2)
##  MASS                     7.3-58.2  2023-01-23 [3] RSPM (R 4.2.0)
##  Matrix                   1.5-3     2022-11-11 [3] RSPM (R 4.2.0)
##  MatrixGenerics         * 1.10.0    2022-11-01 [1] Bioconductor
##  matrixStats            * 0.63.0    2022-11-18 [1] CRAN (R 4.2.2)
##  memoise                  2.0.1     2021-11-26 [2] RSPM (R 4.2.0)
##  mgcv                     1.8-41    2022-10-21 [3] CRAN (R 4.2.2)
##  mime                     0.12      2021-09-28 [2] RSPM (R 4.2.0)
##  miniUI                   0.1.1.1   2018-05-18 [2] RSPM (R 4.2.0)
##  munsell                  0.5.0     2018-06-12 [1] CRAN (R 4.2.2)
##  nlme                     3.1-162   2023-01-31 [3] RSPM (R 4.2.0)
##  paletteer                1.5.0     2022-10-19 [1] RSPM (R 4.2.0)
##  patchwork              * 1.1.2     2022-08-19 [1] CRAN (R 4.2.2)
##  pheatmap               * 1.0.12    2019-01-04 [1] CRAN (R 4.2.2)
##  pillar                   1.8.1     2022-08-19 [2] RSPM (R 4.2.0)
##  pkgconfig                2.0.3     2019-09-22 [2] RSPM (R 4.2.0)
##  pkgload                  1.3.2     2022-11-16 [2] RSPM (R 4.2.0)
##  plotly                   4.10.1    2022-11-07 [1] CRAN (R 4.2.2)
##  png                      0.1-8     2022-11-29 [1] CRAN (R 4.2.2)
##  postcards              * 0.2.3     2022-01-07 [1] RSPM (R 4.2.0)
##  promises                 1.2.0.1   2021-02-11 [2] RSPM (R 4.2.0)
##  purrr                    1.0.1     2023-01-10 [2] RSPM (R 4.2.0)
##  R.cache                  0.16.0    2022-07-21 [1] CRAN (R 4.2.2)
##  R.methodsS3              1.8.2     2022-06-13 [1] CRAN (R 4.2.2)
##  R.oo                     1.25.0    2022-06-12 [1] CRAN (R 4.2.2)
##  R.utils                  2.12.2    2022-11-11 [1] CRAN (R 4.2.2)
##  R6                       2.5.1     2021-08-19 [2] RSPM (R 4.2.0)
##  rappdirs                 0.3.3     2021-01-31 [2] RSPM (R 4.2.0)
##  RColorBrewer           * 1.1-3     2022-04-03 [1] CRAN (R 4.2.2)
##  Rcpp                     1.0.10    2023-01-22 [2] RSPM (R 4.2.0)
##  RCurl                    1.98-1.10 2023-01-27 [1] RSPM (R 4.2.0)
##  recount3               * 1.8.0     2022-11-01 [1] Bioconductor
##  rematch2                 2.1.2     2020-05-01 [2] RSPM (R 4.2.0)
##  restfulr                 0.0.15    2022-06-16 [1] CRAN (R 4.2.2)
##  rhdf5                    2.42.0    2022-11-01 [1] Bioconductor
##  rhdf5filters             1.10.0    2022-11-01 [1] Bioconductor
##  Rhdf5lib                 1.20.0    2022-11-01 [1] Bioconductor
##  rintrojs                 0.3.2     2022-08-09 [1] CRAN (R 4.2.2)
##  rjson                    0.2.21    2022-01-09 [1] CRAN (R 4.2.2)
##  rlang                    1.0.6     2022-09-24 [2] RSPM (R 4.2.0)
##  rmarkdown                2.20      2023-01-19 [2] RSPM (R 4.2.0)
##  roxygen2                 7.2.3     2022-12-08 [2] RSPM (R 4.2.0)
##  rprojroot                2.0.3     2022-04-02 [2] RSPM (R 4.2.0)
##  Rsamtools                2.14.0    2022-11-01 [1] Bioconductor
##  RSQLite                  2.2.20    2022-12-22 [1] RSPM (R 4.2.0)
##  rstudioapi               0.14      2022-08-22 [2] RSPM (R 4.2.0)
##  rsvd                     1.0.5     2021-04-16 [1] CRAN (R 4.2.2)
##  rtracklayer              1.58.0    2022-11-01 [1] Bioconductor
##  S4Vectors              * 0.36.1    2022-12-05 [1] Bioconductor
##  sass                     0.4.5     2023-01-24 [2] RSPM (R 4.2.0)
##  ScaledMatrix             1.6.0     2022-11-01 [1] Bioconductor
##  scales                   1.2.1     2022-08-20 [1] CRAN (R 4.2.2)
##  scater                   1.26.1    2022-11-13 [1] Bioconductor
##  scuttle                  1.8.4     2023-01-19 [1] Bioconductor
##  sessioninfo            * 1.2.2     2021-12-06 [2] RSPM (R 4.2.0)
##  shape                    1.4.6     2021-05-19 [1] CRAN (R 4.2.2)
##  shiny                    1.7.4     2022-12-15 [2] RSPM (R 4.2.0)
##  shinyAce                 0.4.2     2022-05-06 [1] CRAN (R 4.2.2)
##  shinydashboard           0.7.2     2021-09-30 [1] CRAN (R 4.2.2)
##  shinyjs                  2.1.0     2021-12-23 [1] CRAN (R 4.2.2)
##  shinyWidgets             0.7.6     2023-01-08 [1] RSPM (R 4.2.0)
##  SingleCellExperiment   * 1.20.0    2022-11-01 [1] Bioconductor
##  spam                     2.9-1     2022-08-07 [1] CRAN (R 4.2.2)
##  sparseMatrixStats        1.10.0    2022-11-01 [1] Bioconductor
##  SpatialExperiment      * 1.8.0     2022-11-01 [1] Bioconductor
##  spatialLIBD            * 1.10.1    2022-12-01 [1] Bioconductor
##  statmod                  1.5.0     2023-01-06 [1] RSPM (R 4.2.0)
##  stringi                  1.7.12    2023-01-11 [2] RSPM (R 4.2.0)
##  stringr                  1.5.0     2022-12-02 [2] RSPM (R 4.2.0)
##  styler                   1.9.0     2023-01-15 [1] RSPM (R 4.2.0)
##  SummarizedExperiment   * 1.28.0    2022-11-01 [1] Bioconductor
##  tibble                   3.1.8     2022-07-22 [2] RSPM (R 4.2.0)
##  tidyr                    1.3.0     2023-01-24 [1] RSPM (R 4.2.0)
##  tidyselect               1.2.0     2022-10-10 [1] CRAN (R 4.2.2)
##  usethis                * 2.1.6     2022-05-25 [2] RSPM (R 4.2.0)
##  utf8                     1.2.3     2023-01-31 [2] RSPM (R 4.2.0)
##  vctrs                    0.5.2     2023-01-23 [2] RSPM (R 4.2.0)
##  vipor                    0.4.5     2017-03-22 [1] CRAN (R 4.2.2)
##  viridis                  0.6.2     2021-10-13 [1] CRAN (R 4.2.2)
##  viridisLite              0.4.1     2022-08-22 [1] CRAN (R 4.2.2)
##  withr                    2.5.0     2022-03-03 [2] RSPM (R 4.2.0)
##  xfun                     0.37      2023-01-31 [2] RSPM (R 4.2.0)
##  XML                      3.99-0.13 2022-12-04 [1] CRAN (R 4.2.2)
##  xml2                     1.3.3     2021-11-30 [2] RSPM (R 4.2.0)
##  xtable                   1.8-4     2019-04-21 [2] RSPM (R 4.2.0)
##  XVector                  0.38.0    2022-11-01 [1] Bioconductor
##  yaml                     2.3.7     2023-01-23 [2] RSPM (R 4.2.0)
##  zlibbioc                 1.44.0    2022-11-01 [1] Bioconductor
## 
##  [1] /__w/_temp/Library
##  [2] /usr/local/lib/R/site-library
##  [3] /usr/local/lib/R/library
## 
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
proc.time()
##    user  system elapsed 
##  15.111   0.890  15.887

This book was last updated at 2023-02-03 00:09:47.

© 2011-2020. All thoughts and opinions here are my own. The icon was designed by Mauricio Guzmán and is inspired by Huichol culture; it represents my community building interests.

Published with Bookdown