You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lessons/wk6_lesson02_count_normalization.md
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,18 @@
1
1
---
2
2
title: "Count normalization with DESeq2"
3
3
author: "Harvard HPC Staff, Adapted by Sally Chang @ NICHD"
4
-
date: "Last Modified April 2025"
4
+
date: "Last Modified May 2025"
5
5
---
6
6
7
7
Approximate time: 60 minutes
8
8
9
-
### NOTE:
10
-
To make names more generalized for the next course, `/data/Bspc-training/shared/rnaseq_jan2025` is now `/data/Bspc-training/shared/rnaseq_mov10` . Make sure to edit any scripts that refer to the shared data!
11
-
12
9
## Learning Objectives
13
10
14
11
- Explore different types of normalization methods
15
12
- Become familiar with the `DESeqDataSet` object
16
13
- Understand how to normalize counts using DESeq2
17
14
18
-
### Opening the project using RStudio (HPC on Demand)
15
+
### Preparing for this lesson:
19
16
20
17
Before we get into the details of the analysis, let's start by:
21
18
@@ -25,6 +22,23 @@ Before we get into the details of the analysis, let's start by:
25
22
26
23
- Using the Project menu in the top right corner, or the Files Pane window (clicking rnaseq -\> DEanalysis), to navigate to and open `DEanalysis.Rproj`, which you set up as an Assignment last week.
27
24
25
+
If you missed the last lesson, or need to make sure you have the right packages and data loaded, please run the following commands:
26
+
27
+
```r
28
+
# Setup
29
+
# Bioconductor and CRAN libraries used - already installed on Biowulf
Copy file name to clipboardExpand all lines: lessons/wk6_lesson03_dge_qc_analysis.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,9 +157,9 @@ Now that we have a good understanding of the QC steps normally employed for RNA-
157
157
158
158
1.Get your HPC On Demand session going:
159
159
160
-
- Opening up RStudio using [HPC on Demand](https://hpcondemand.nih.gov/pun/sys/dashboard/), using default values except for Starting Directory: `/data/Bspc-training/YOUR_USERNAME/rnaseq`
160
+
- Opening up RStudio using [HPC on Demand](https://hpcondemand.nih.gov/pun/sys/dashboard/), using default values except for Starting Directory: `/data/YOUR_USERNAME/rnaseq`
161
161
162
-
- To check whether or not you are in the correct working directory, use `getwd()`. Something like `/vf/users/Bspc-training/changes/rnaseq` should come up.
162
+
- To check whether or not you are in the correct working directory, use `getwd()`. Something like `/vf/users/changes/rnaseq` should come up.
163
163
164
164
- Using the Project menu in the top right corner, or the Files Pane window (clicking rnaseq -\> DEanalysis), to navigate to and open `DEanalysis.Rproj`
When you plot using `pheatmap()` the hierarchical clustering information is used to place similar samples together and this information is represented by the tree structure along the axes. The `annotation` argument accepts a dataframe as input, in our case it is the `meta` data frame.
297
299
298
300
<palign="center">
299
-
<imgsrc="../img/mov10_default_heatmap.png"width="600"alt="mov10 heatmap with default settings"/>
301
+
302
+
<imgsrc="../img/mov10_default_heatmap.png"alt="mov10 heatmap with default settings"width="600"/>
303
+
300
304
</p>
301
305
302
306
Overall, we observe pretty high correlations across the board ( \> 0.999) suggesting no outlying sample(s). Also, similar to the PCA plot you see the samples clustering together by sample group. Together, these plots suggest to us that the data are of good quality and we have the green light to proceed to differential expression analysis.
Copy file name to clipboardExpand all lines: lessons/wk6_lesson04_design_formulas.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,28 @@ Approximate time: 30 minutes
11
11
- Demonstrate the use of the design formula with simple and complex designs
12
12
- Construct R code to execute the differential expression analysis workflow with DESeq2
13
13
14
+
## Catch-up Script:
15
+
16
+
If you need to be completely caught up, you can copy and paste the following into an R Script and run it. If you don't already have the files in your `/data` directory, please see [Wk 5 Lesson 01](../wk5_lesson01_introR_Rstudio.md) for instructions on where to obtain the input files.
17
+
18
+
```r
19
+
# Setup
20
+
# Bioconductor and CRAN libraries used - already installed on Biowulf
The final step in the differential expression analysis workflow is **fitting the raw counts to the NB model and performing the statistical test** for differentially expressed genes. In this step we essentially want to determine whether the mean expression levels of different sample groups are significantly different.
@@ -168,3 +190,28 @@ Given the the metadata table you have sent me for your own experiment, do the fo
168
190
169
191
1. Write a design formula for your experiment, in the format of `design = ~ sex + age + treatment` . Make sure to include any interaction terms or terms that you want to "regress" out. There are additional recommendations for complex designs in the [DESeq2 vignette](https://www.bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#interactions).
170
192
2. Briefly explain (in 1-2 sentences) the reasoning for this design formula.
193
+
194
+
## Your DE script
195
+
196
+
In this lesson, we took the additional step of running the actual DESeq2 analysis. Your `de_script.R` should now contain the following commands to re-create necessary data objects (click to show):
197
+
198
+
```r
199
+
# Setup
200
+
# Bioconductor and CRAN libraries used - already installed on Biowulf
0 commit comments