Overview

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

Instructor:

Teach assistants:

Course Coordinators:

  • Heladia Salgado
  • Julio Collado Vides

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

Code of Conduct

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

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

  • Tuesday February 23:
    • 9-11 am: introduction to R, RStudio, usethis and here
    • 12-2 pm: introduction to Bioconductor
  • Wednesday February 24:
  • Thursday February 25:
  • Friday February 26:
    • 9-11 am: Review session
    • 12-2 pm: spatial transcriptomics with spatialLIBD + open discussion (career paths, networking, etc)

Course Prerequisites

Install R 4.0.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",
        "postcards",
        "pryr",
        "sessioninfo",

        "SummarizedExperiment", ## Main containers / vis
        "iSEE",

        "edgeR", ## RNA-seq
        "ExploreModelMatrix",
        "limma",
        "recount3",

        "pheatmap", ## Visualization
        "ggplot2",
        "patchwork",
        "RColorBrewer",

        "spatialLIBD" ## Advanced
    )
)

You will also need to install RStudio version 1.4 or newer.

Course Evaluation

  • Participation
    • (main evidence) written and/or verbal participation during sessions and break-out rooms
    • (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 URL (gist, GitHub, …)
    • (optional) a rendered Rmd file (RPubs, GitHub)
    • (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.

The final grade will be a weighted average from the student’s self evaluation (10%), the evaluation by each TA (15% each), your participation as evaluated by the instructor (10%), your public work (20%) and your final project (30%).

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

R session information

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

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

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

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

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

## Visualization
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.0.3 (2020-10-10)
##  os       Ubuntu 20.04.1 LTS          
##  system   x86_64, linux-gnu           
##  ui       X11                         
##  language (EN)                        
##  collate  en_US.UTF-8                 
##  ctype    en_US.UTF-8                 
##  tz       Etc/UTC                     
##  date     2021-03-04                  
## 
## ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
##  package                * version  date       lib source        
##  AnnotationDbi            1.52.0   2020-10-27 [1] Bioconductor  
##  AnnotationHub            2.22.0   2020-10-27 [1] Bioconductor  
##  assertthat               0.2.1    2019-03-21 [2] RSPM (R 4.0.0)
##  attempt                  0.3.1    2020-05-03 [1] RSPM (R 4.0.0)
##  backports                1.2.1    2020-12-09 [1] RSPM (R 4.0.3)
##  beachmat                 2.6.4    2020-12-20 [1] Bioconductor  
##  beeswarm                 0.2.3    2016-04-25 [1] RSPM (R 4.0.0)
##  benchmarkme              1.0.6    2021-02-26 [1] RSPM (R 4.0.3)
##  benchmarkmeData          1.0.4    2020-04-23 [1] RSPM (R 4.0.3)
##  Biobase                * 2.50.0   2020-10-27 [1] Bioconductor  
##  BiocFileCache            1.14.0   2020-10-27 [1] Bioconductor  
##  BiocGenerics           * 0.36.0   2020-10-27 [1] Bioconductor  
##  BiocManager            * 1.30.10  2019-11-16 [2] CRAN (R 4.0.3)
##  BiocNeighbors            1.8.2    2020-12-07 [1] Bioconductor  
##  BiocParallel             1.24.1   2020-11-06 [1] Bioconductor  
##  BiocSingular             1.6.0    2020-10-27 [1] Bioconductor  
##  BiocStyle              * 2.18.1   2020-11-24 [1] Bioconductor  
##  biocthis               * 1.0.10   2021-02-26 [1] Bioconductor  
##  BiocVersion              3.12.0   2020-04-27 [2] Bioconductor  
##  Biostrings               2.58.0   2020-10-27 [1] Bioconductor  
##  bit                      4.0.4    2020-08-04 [1] RSPM (R 4.0.3)
##  bit64                    4.0.5    2020-08-30 [1] RSPM (R 4.0.3)
##  bitops                   1.0-6    2013-08-17 [1] RSPM (R 4.0.3)
##  blob                     1.2.1    2020-01-20 [1] RSPM (R 4.0.3)
##  bmp                      0.3      2017-09-11 [1] RSPM (R 4.0.3)
##  bookdown                 0.21     2020-10-13 [1] RSPM (R 4.0.2)
##  bslib                    0.2.4    2021-01-25 [1] RSPM (R 4.0.3)
##  cachem                   1.0.4    2021-02-13 [2] RSPM (R 4.0.3)
##  Cairo                    1.5-12.2 2020-07-07 [1] RSPM (R 4.0.3)
##  circlize                 0.4.12   2021-01-08 [1] RSPM (R 4.0.3)
##  cli                      2.3.1    2021-02-23 [2] RSPM (R 4.0.3)
##  clue                     0.3-58   2020-12-03 [1] RSPM (R 4.0.3)
##  cluster                  2.1.1    2021-02-14 [3] RSPM (R 4.0.3)
##  codetools                0.2-18   2020-11-04 [3] RSPM (R 4.0.3)
##  colorspace               2.0-0    2020-11-11 [1] RSPM (R 4.0.3)
##  colourpicker             1.1.0    2020-09-14 [1] RSPM (R 4.0.2)
##  ComplexHeatmap           2.6.2    2020-11-12 [1] Bioconductor  
##  config                   0.3.1    2020-12-17 [1] RSPM (R 4.0.3)
##  cowplot                  1.1.1    2020-12-30 [1] RSPM (R 4.0.3)
##  crayon                   1.4.1    2021-02-08 [2] RSPM (R 4.0.3)
##  curl                     4.3      2019-12-02 [2] RSPM (R 4.0.0)
##  data.table               1.14.0   2021-02-21 [1] RSPM (R 4.0.3)
##  DBI                      1.1.1    2021-01-15 [1] RSPM (R 4.0.3)
##  dbplyr                   2.1.0    2021-02-03 [1] RSPM (R 4.0.3)
##  DelayedArray             0.16.2   2021-02-26 [1] Bioconductor  
##  DelayedMatrixStats       1.12.3   2021-02-03 [1] Bioconductor  
##  desc                     1.2.0    2018-05-01 [2] RSPM (R 4.0.0)
##  digest                   0.6.27   2020-10-24 [2] RSPM (R 4.0.3)
##  dockerfiler              0.1.3    2019-03-19 [1] RSPM (R 4.0.0)
##  doParallel               1.0.16   2020-10-16 [1] RSPM (R 4.0.3)
##  dotCall64                1.0-1    2021-02-11 [1] RSPM (R 4.0.3)
##  dplyr                    1.0.4    2021-02-02 [1] RSPM (R 4.0.3)
##  DT                       0.17     2021-01-06 [2] RSPM (R 4.0.3)
##  edgeR                  * 3.32.1   2021-01-14 [1] Bioconductor  
##  ellipsis                 0.3.1    2020-05-15 [2] RSPM (R 4.0.0)
##  evaluate                 0.14     2019-05-28 [2] RSPM (R 4.0.0)
##  ExperimentHub            1.16.0   2020-10-27 [1] Bioconductor  
##  ExploreModelMatrix     * 1.2.0    2020-10-27 [1] Bioconductor  
##  fansi                    0.4.2    2021-01-15 [2] RSPM (R 4.0.3)
##  fastmap                  1.1.0    2021-01-25 [2] RSPM (R 4.0.3)
##  fields                   11.6     2020-10-09 [1] RSPM (R 4.0.3)
##  foreach                  1.5.1    2020-10-15 [1] RSPM (R 4.0.3)
##  fs                       1.5.0    2020-07-31 [2] RSPM (R 4.0.2)
##  generics                 0.1.0    2020-10-31 [1] RSPM (R 4.0.3)
##  GenomeInfoDb           * 1.26.2   2020-12-08 [1] Bioconductor  
##  GenomeInfoDbData         1.2.4    2021-02-19 [1] Bioconductor  
##  GenomicAlignments        1.26.0   2020-10-27 [1] Bioconductor  
##  GenomicRanges          * 1.42.0   2020-10-27 [1] Bioconductor  
##  GetoptLong               1.0.5    2020-12-15 [1] RSPM (R 4.0.3)
##  ggbeeswarm               0.6.0    2017-08-07 [1] RSPM (R 4.0.0)
##  ggplot2                * 3.3.3    2020-12-30 [1] RSPM (R 4.0.3)
##  ggrepel                  0.9.1    2021-01-15 [1] RSPM (R 4.0.3)
##  GlobalOptions            0.1.2    2020-06-10 [1] RSPM (R 4.0.3)
##  glue                     1.4.2    2020-08-27 [2] RSPM (R 4.0.2)
##  golem                    0.2.1    2020-03-05 [1] RSPM (R 4.0.0)
##  gridExtra                2.3      2017-09-09 [1] RSPM (R 4.0.3)
##  gtable                   0.3.0    2019-03-25 [1] RSPM (R 4.0.3)
##  here                   * 1.0.1    2020-12-13 [1] RSPM (R 4.0.3)
##  htmltools                0.5.1.1  2021-01-22 [2] RSPM (R 4.0.3)
##  htmlwidgets              1.5.3    2020-12-10 [2] RSPM (R 4.0.3)
##  httpuv                   1.5.5    2021-01-13 [1] RSPM (R 4.0.3)
##  httr                     1.4.2    2020-07-20 [2] RSPM (R 4.0.2)
##  igraph                   1.2.6    2020-10-06 [1] RSPM (R 4.0.3)
##  interactiveDisplayBase   1.28.0   2020-10-27 [1] Bioconductor  
##  IRanges                * 2.24.1   2020-12-12 [1] Bioconductor  
##  irlba                    2.3.3    2019-02-05 [1] RSPM (R 4.0.3)
##  iSEE                   * 2.2.4    2021-02-01 [1] Bioconductor  
##  iterators                1.0.13   2020-10-15 [1] RSPM (R 4.0.3)
##  jpeg                     0.1-8.1  2019-10-24 [1] RSPM (R 4.0.3)
##  jquerylib                0.1.3    2020-12-17 [1] RSPM (R 4.0.3)
##  jsonlite                 1.7.2    2020-12-09 [2] RSPM (R 4.0.3)
##  knitr                    1.31     2021-01-27 [2] RSPM (R 4.0.3)
##  later                    1.1.0.1  2020-06-05 [2] RSPM (R 4.0.2)
##  lattice                  0.20-41  2020-04-02 [3] CRAN (R 4.0.3)
##  lazyeval                 0.2.2    2019-03-15 [2] RSPM (R 4.0.0)
##  lifecycle                1.0.0    2021-02-15 [2] RSPM (R 4.0.3)
##  limma                  * 3.46.0   2020-10-27 [1] Bioconductor  
##  locfit                   1.5-9.4  2020-03-25 [1] RSPM (R 4.0.3)
##  magrittr                 2.0.1    2020-11-17 [2] RSPM (R 4.0.3)
##  maps                     3.3.0    2018-04-03 [1] RSPM (R 4.0.3)
##  MASS                     7.3-53.1 2021-02-12 [3] RSPM (R 4.0.3)
##  Matrix                   1.3-2    2021-01-06 [3] RSPM (R 4.0.3)
##  MatrixGenerics         * 1.2.1    2021-01-30 [1] Bioconductor  
##  matrixStats            * 0.58.0   2021-01-29 [1] RSPM (R 4.0.3)
##  memoise                  2.0.0    2021-01-26 [2] RSPM (R 4.0.3)
##  mgcv                     1.8-34   2021-02-16 [3] RSPM (R 4.0.3)
##  mime                     0.10     2021-02-13 [2] RSPM (R 4.0.3)
##  miniUI                   0.1.1.1  2018-05-18 [1] RSPM (R 4.0.3)
##  munsell                  0.5.0    2018-06-12 [1] RSPM (R 4.0.3)
##  nlme                     3.1-152  2021-02-04 [3] RSPM (R 4.0.3)
##  patchwork              * 1.1.1    2020-12-17 [1] RSPM (R 4.0.3)
##  pheatmap               * 1.0.12   2019-01-04 [1] RSPM (R 4.0.3)
##  pillar                   1.5.0    2021-02-22 [2] RSPM (R 4.0.3)
##  pkgconfig                2.0.3    2019-09-22 [2] RSPM (R 4.0.0)
##  pkgload                  1.2.0    2021-02-23 [2] RSPM (R 4.0.3)
##  plotly                   4.9.3    2021-01-10 [1] RSPM (R 4.0.3)
##  png                      0.1-7    2013-12-03 [1] RSPM (R 4.0.3)
##  Polychrome               1.2.6    2020-11-11 [1] RSPM (R 4.0.3)
##  postcards              * 0.2.0    2021-01-06 [1] RSPM (R 4.0.3)
##  promises                 1.2.0.1  2021-02-11 [2] RSPM (R 4.0.3)
##  pryr                   * 0.1.4    2018-02-18 [1] RSPM (R 4.0.3)
##  purrr                    0.3.4    2020-04-17 [2] RSPM (R 4.0.0)
##  R.methodsS3              1.8.1    2020-08-26 [1] RSPM (R 4.0.3)
##  R.oo                     1.24.0   2020-08-26 [1] RSPM (R 4.0.3)
##  R.utils                  2.10.1   2020-08-26 [1] RSPM (R 4.0.3)
##  R6                       2.5.0    2020-10-28 [2] RSPM (R 4.0.3)
##  rappdirs                 0.3.3    2021-01-31 [2] RSPM (R 4.0.3)
##  RColorBrewer           * 1.1-2    2014-12-07 [1] RSPM (R 4.0.3)
##  Rcpp                     1.0.6    2021-01-15 [2] RSPM (R 4.0.3)
##  RCurl                    1.98-1.2 2020-04-18 [1] RSPM (R 4.0.3)
##  readbitmap               0.1.5    2018-06-27 [1] RSPM (R 4.0.3)
##  recount3               * 1.0.7    2021-02-11 [1] Bioconductor  
##  remotes                  2.2.0    2020-07-21 [2] RSPM (R 4.0.2)
##  rintrojs                 0.2.2    2019-05-29 [1] RSPM (R 4.0.0)
##  rjson                    0.2.20   2018-06-08 [1] RSPM (R 4.0.3)
##  rlang                    0.4.10   2020-12-30 [2] RSPM (R 4.0.3)
##  rmarkdown                2.7      2021-02-19 [1] RSPM (R 4.0.3)
##  roxygen2                 7.1.1    2020-06-27 [2] RSPM (R 4.0.2)
##  rprojroot                2.0.2    2020-11-15 [2] RSPM (R 4.0.3)
##  Rsamtools                2.6.0    2020-10-27 [1] Bioconductor  
##  RSQLite                  2.2.3    2021-01-24 [1] RSPM (R 4.0.3)
##  rstudioapi               0.13     2020-11-12 [2] RSPM (R 4.0.3)
##  rsvd                     1.0.3    2020-02-17 [1] RSPM (R 4.0.0)
##  rtracklayer              1.50.0   2020-10-27 [1] Bioconductor  
##  S4Vectors              * 0.28.1   2020-12-09 [1] Bioconductor  
##  sass                     0.3.1    2021-01-24 [1] RSPM (R 4.0.3)
##  scales                   1.1.1    2020-05-11 [1] RSPM (R 4.0.3)
##  scater                   1.18.6   2021-02-26 [1] Bioconductor  
##  scatterplot3d            0.3-41   2018-03-14 [1] RSPM (R 4.0.3)
##  scuttle                  1.0.4    2020-12-17 [1] Bioconductor  
##  sessioninfo            * 1.1.1    2018-11-05 [1] RSPM (R 4.0.3)
##  shape                    1.4.5    2020-09-13 [1] RSPM (R 4.0.3)
##  shiny                    1.6.0    2021-01-25 [1] RSPM (R 4.0.3)
##  shinyAce                 0.4.1    2019-09-24 [1] RSPM (R 4.0.0)
##  shinydashboard           0.7.1    2018-10-17 [1] RSPM (R 4.0.3)
##  shinyjs                  2.0.0    2020-09-09 [1] RSPM (R 4.0.3)
##  shinyWidgets             0.5.7    2021-02-03 [1] RSPM (R 4.0.3)
##  SingleCellExperiment   * 1.12.0   2020-10-27 [1] Bioconductor  
##  spam                     2.6-0    2020-12-14 [1] RSPM (R 4.0.3)
##  sparseMatrixStats        1.2.1    2021-02-02 [1] Bioconductor  
##  SpatialExperiment        1.0.0    2020-10-27 [1] Bioconductor  
##  spatialLIBD            * 1.2.1    2020-12-21 [1] Bioconductor  
##  stringi                  1.5.3    2020-09-09 [2] RSPM (R 4.0.2)
##  stringr                  1.4.0    2019-02-10 [2] RSPM (R 4.0.0)
##  styler                   1.3.2    2020-02-23 [1] RSPM (R 4.0.3)
##  SummarizedExperiment   * 1.20.0   2020-10-27 [1] Bioconductor  
##  testthat                 3.0.2    2021-02-14 [2] RSPM (R 4.0.3)
##  tibble                   3.1.0    2021-02-25 [2] RSPM (R 4.0.3)
##  tidyr                    1.1.2    2020-08-27 [1] RSPM (R 4.0.3)
##  tidyselect               1.1.0    2020-05-11 [1] RSPM (R 4.0.3)
##  tiff                     0.1-7    2021-03-02 [1] RSPM (R 4.0.3)
##  usethis                * 2.0.1    2021-02-10 [1] RSPM (R 4.0.3)
##  utf8                     1.1.4    2018-05-24 [2] RSPM (R 4.0.0)
##  vctrs                    0.3.6    2020-12-17 [2] RSPM (R 4.0.3)
##  vipor                    0.4.5    2017-03-22 [1] RSPM (R 4.0.0)
##  viridis                  0.5.1    2018-03-29 [1] RSPM (R 4.0.3)
##  viridisLite              0.3.0    2018-02-01 [1] RSPM (R 4.0.3)
##  withr                    2.4.1    2021-01-26 [2] RSPM (R 4.0.3)
##  xfun                     0.21     2021-02-10 [2] RSPM (R 4.0.3)
##  XML                      3.99-0.5 2020-07-23 [1] RSPM (R 4.0.3)
##  xml2                     1.3.2    2020-04-23 [2] RSPM (R 4.0.0)
##  xtable                   1.8-4    2019-04-21 [1] RSPM (R 4.0.3)
##  XVector                  0.30.0   2020-10-27 [1] Bioconductor  
##  yaml                     2.2.1    2020-02-01 [2] RSPM (R 4.0.0)
##  zlibbioc                 1.36.0   2020-10-27 [1] Bioconductor  
## 
## [1] /__w/_temp/Library
## [2] /usr/local/lib/R/site-library
## [3] /usr/local/lib/R/library
proc.time()
##    user  system elapsed 
##  17.707   0.889  18.633

This book was last updated at 2021-03-04 14:48:02.

© 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