Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates following the EuroBioC workshop #93

Merged
merged 4 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions episodes/01-intro-to-rnaseq.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
source: Rmd
title: Introduction to RNA-seq
teaching: 45
exercises: 30
teaching: 65
exercises: 35
---


Expand Down Expand Up @@ -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.

::::::::::::::::::::::::::::::::::::::::::::::::::

Expand Down
2 changes: 1 addition & 1 deletion episodes/02-setup.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: Rmd
title: RStudio Project and Experimental Data
teaching: 20
exercises: 20
exercises: 10
---

:::::::::::::::::::::::::::::::::::::: questions
Expand Down
4 changes: 2 additions & 2 deletions episodes/03-import-annotate.Rmd
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
36 changes: 18 additions & 18 deletions episodes/04-exploratory-qc.Rmd
Original file line number Diff line number Diff line change
@@ -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
---
Expand Down Expand Up @@ -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")) +
Expand Down Expand Up @@ -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")
```


Expand Down
5 changes: 3 additions & 2 deletions learners/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ 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",
"DESeq2", "vsn", "ComplexHeatmap", "hgu95av2.db",
"RColorBrewer", "hexbin", "cowplot", "iSEE",
"clusterProfiler", "enrichplot", "kableExtra",
"msigdbr", "gplots", "ggplot2", "simplifyEnrichment",
"apeglm", "microbenchmark", "Biostrings"))
"apeglm", "microbenchmark", "Biostrings",
"SingleCellExperiment"))

```

Expand Down
Loading