From 953844b40e3d959b97946db80aaca77138a0d464 Mon Sep 17 00:00:00 2001 From: Charlotte Soneson Date: Sat, 7 Oct 2023 09:22:04 +0200 Subject: [PATCH 1/4] Update timings based on 2023 workshops --- episodes/01-intro-to-rnaseq.Rmd | 4 ++-- episodes/02-setup.Rmd | 2 +- episodes/03-import-annotate.Rmd | 4 ++-- episodes/04-exploratory-qc.Rmd | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/episodes/01-intro-to-rnaseq.Rmd b/episodes/01-intro-to-rnaseq.Rmd index d5396caa..56c70f85 100644 --- a/episodes/01-intro-to-rnaseq.Rmd +++ b/episodes/01-intro-to-rnaseq.Rmd @@ -1,8 +1,8 @@ --- source: Rmd title: Introduction to RNA-seq -teaching: 45 -exercises: 30 +teaching: 65 +exercises: 35 --- diff --git a/episodes/02-setup.Rmd b/episodes/02-setup.Rmd index 2352affe..5e78ce78 100644 --- a/episodes/02-setup.Rmd +++ b/episodes/02-setup.Rmd @@ -2,7 +2,7 @@ source: Rmd title: RStudio Project and Experimental Data teaching: 20 -exercises: 20 +exercises: 10 --- :::::::::::::::::::::::::::::::::::::: questions diff --git a/episodes/03-import-annotate.Rmd b/episodes/03-import-annotate.Rmd index 1588fe58..be296a3f 100644 --- a/episodes/03-import-annotate.Rmd +++ b/episodes/03-import-annotate.Rmd @@ -1,11 +1,11 @@ --- title: "Importing and annotating quantified data into R" source: Rmd -teaching: 75 +teaching: 80 output: html_document: df_print: paged -exercises: 30 +exercises: 40 --- ```{r setup, echo = FALSE, message = FALSE} diff --git a/episodes/04-exploratory-qc.Rmd b/episodes/04-exploratory-qc.Rmd index cf788c93..4c0162fa 100644 --- a/episodes/04-exploratory-qc.Rmd +++ b/episodes/04-exploratory-qc.Rmd @@ -1,8 +1,8 @@ --- source: Rmd title: Exploratory analysis and quality control -teaching: 60 -exercises: 45 +teaching: 120 +exercises: 60 editor_options: chunk_output_type: console --- From 27399c7f6d267a0a850ae7146ab93b8793b24532 Mon Sep 17 00:00:00 2001 From: Charlotte Soneson Date: Sat, 7 Oct 2023 09:24:36 +0200 Subject: [PATCH 2/4] Add a couple of dependencies --- learners/setup.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/learners/setup.md b/learners/setup.md index 85eb6f20..12e24681 100644 --- a/learners/setup.md +++ b/learners/setup.md @@ -10,7 +10,7 @@ episode of the [Introduction to data analysis with R and Bioconductor](https://c Additionally, you will also need to install the following packages that will be used throughout the lesson. ```r -install.packages("BiocManager") +install.packages(c("BiocManager", "remotes")) BiocManager::install(c("tidyverse", "SummarizedExperiment", "ExploreModelMatrix", "AnnotationDbi", "org.Hs.eg.db", "org.Mm.eg.db", "csoneson/ConfoundingExplorer", @@ -18,7 +18,8 @@ BiocManager::install(c("tidyverse", "SummarizedExperiment", "RColorBrewer", "hexbin", "cowplot", "iSEE", "clusterProfiler", "enrichplot", "kableExtra", "msigdbr", "gplots", "ggplot2", "simplifyEnrichment", - "apeglm", "microbenchmark", "Biostrings")) + "apeglm", "microbenchmark", "Biostrings", + "SingleCellExperiment")) ``` From 8130462eacc32a0aa021791ff3a668123d2ce416 Mon Sep 17 00:00:00 2001 From: Charlotte Soneson Date: Sat, 7 Oct 2023 09:26:44 +0200 Subject: [PATCH 3/4] Add hint for transcriptome exploration exercise --- episodes/01-intro-to-rnaseq.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/01-intro-to-rnaseq.Rmd b/episodes/01-intro-to-rnaseq.Rmd index 56c70f85..b8920e04 100644 --- a/episodes/01-intro-to-rnaseq.Rmd +++ b/episodes/01-intro-to-rnaseq.Rmd @@ -172,7 +172,7 @@ If you are mapping your reads to the transcriptome, you will instead need a file ## Challenge -Download the latest mouse transcriptome fasta file from GENCODE and uncompress it. What do the entries look like? Tip: to read the file into R, consider the `Biostrings` package. +Download the latest mouse transcriptome fasta file from GENCODE. What do the entries look like? Tip: to read the file into R, consider the `readDNAStringSet()` function from the `Biostrings` package. :::::::::::::::::::::::::::::::::::::::::::::::::: From a0b04d137802db9f6299e92120798b1a51c740be Mon Sep 17 00:00:00 2001 From: Charlotte Soneson Date: Sat, 7 Oct 2023 09:39:23 +0200 Subject: [PATCH 4/4] Rename pcaData in exercises --- episodes/04-exploratory-qc.Rmd | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/episodes/04-exploratory-qc.Rmd b/episodes/04-exploratory-qc.Rmd index 4c0162fa..4a4a6cf1 100644 --- a/episodes/04-exploratory-qc.Rmd +++ b/episodes/04-exploratory-qc.Rmd @@ -237,10 +237,10 @@ levels(vsd_ex$sample) <- c("sampleA", "sampleB", "sampleC", "sampleD", "sampleE", "sampleF") vsd_ex$time <- sample(vsd_ex$time) -pcaData <- DESeq2::plotPCA(vsd_ex, intgroup = c("sample", "time"), - returnData = TRUE) -percentVar <- round(100 * attr(pcaData, "percentVar")) -ggplot(pcaData, aes(x = PC1, y = PC2)) + +pcaDataEx <- DESeq2::plotPCA(vsd_ex, intgroup = c("sample", "time"), + returnData = TRUE) +percentVar <- round(100 * attr(pcaDataEx, "percentVar")) +ggplot(pcaDataEx, aes(x = PC1, y = PC2)) + geom_point(aes(color = sample, shape = time), size = 5) + theme_minimal() + xlab(paste0("PC1: ", percentVar[1], "% variance")) + @@ -279,30 +279,30 @@ Compare before and after variance stabilizing transformation. ::::::::::::::::::::::::::::::::::: solution ```{r pca-lib} -pcaData <- DESeq2::plotPCA(vsd, intgroup = c("libSize"), - returnData = TRUE) -percentVar <- round(100 * attr(pcaData, "percentVar")) -ggplot(pcaData, aes(x = PC1, y = PC2)) + - geom_point(aes(color = libSize/ 1e6), size = 5) + +pcaDataVst <- DESeq2::plotPCA(vsd, intgroup = c("libSize"), + returnData = TRUE) +percentVar <- round(100 * attr(pcaDataVst, "percentVar")) +ggplot(pcaDataVst, aes(x = PC1, y = PC2)) + + geom_point(aes(color = libSize / 1e6), size = 5) + theme_minimal() + xlab(paste0("PC1: ", percentVar[1], "% variance")) + ylab(paste0("PC2: ", percentVar[2], "% variance")) + coord_fixed() + - scale_color_continuous("Total count in millions", type ="viridis") + scale_color_continuous("Total count in millions", type = "viridis") ``` ```{r pca-lib-vst} -pcaData <- DESeq2::plotPCA(DESeqTransform(se), intgroup = c("libSize"), - returnData = TRUE) -percentVar <- round(100 * attr(pcaData, "percentVar")) -ggplot(pcaData, aes(x = PC1, y = PC2)) + - geom_point(aes(color = libSize/ 1e6), size = 5) + +pcaDataCts <- DESeq2::plotPCA(DESeqTransform(se), intgroup = c("libSize"), + returnData = TRUE) +percentVar <- round(100 * attr(pcaDataCts, "percentVar")) +ggplot(pcaDataCts, aes(x = PC1, y = PC2)) + + geom_point(aes(color = libSize / 1e6), size = 5) + theme_minimal() + xlab(paste0("PC1: ", percentVar[1], "% variance")) + ylab(paste0("PC2: ", percentVar[2], "% variance")) + coord_fixed() + - scale_color_continuous("Total count in millions", type ="viridis") + scale_color_continuous("Total count in millions", type = "viridis") ```