Skip to content

Commit 560d602

Browse files
committed
Update directory paths, add code blocks for regenerating data
1 parent ceb6ec5 commit 560d602

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

lessons/wk6_lesson02_count_normalization.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
---
22
title: "Count normalization with DESeq2"
33
author: "Harvard HPC Staff, Adapted by Sally Chang @ NICHD"
4-
date: "Last Modified April 2025"
4+
date: "Last Modified May 2025"
55
---
66

77
Approximate time: 60 minutes
88

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-
129
## Learning Objectives
1310

1411
- Explore different types of normalization methods
1512
- Become familiar with the `DESeqDataSet` object
1613
- Understand how to normalize counts using DESeq2
1714

18-
### Opening the project using RStudio (HPC on Demand)
15+
### Preparing for this lesson:
1916

2017
Before we get into the details of the analysis, let's start by:
2118

@@ -25,6 +22,23 @@ Before we get into the details of the analysis, let's start by:
2522

2623
- 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.
2724

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
30+
library(tidyverse)
31+
library(RColorBrewer)
32+
library(DESeq2)
33+
library(pheatmap)
34+
library(BiocManager)
35+
36+
# Load in data
37+
data <- read.table("data/mov10_AllSamples_featurecounts.Rmatrix.txt", header=T, row.names=1)
38+
39+
meta <- read.table("data/mov10_AllSamples_metadata.txt", header=T, row.names=1)
40+
```
41+
2842
## Normalization
2943

3044
The first step in the DE analysis workflow is count normalization, which is necessary to make accurate comparisons of gene expression between samples.

lessons/wk6_lesson03_dge_qc_analysis.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ Now that we have a good understanding of the QC steps normally employed for RNA-
157157

158158
1.Get your HPC On Demand session going:
159159

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`
161161

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.
163163

164164
- Using the Project menu in the top right corner, or the Files Pane window (clicking rnaseq -\> DEanalysis), to navigate to and open `DEanalysis.Rproj`
165165

@@ -223,7 +223,9 @@ plotPCA(rld, intgroup="sampletype")
223223
```
224224

225225
<p align="center">
226-
<img src="../img/mov10_pca.png" width="600" alt="mov 10 experiement PCA"/>
226+
227+
<img src="../img/mov10_pca.png" alt="mov 10 experiement PCA" width="600"/>
228+
227229
</p>
228230

229231
------------------------------------------------------------------------
@@ -296,7 +298,9 @@ pheatmap(rld_cor, annotation = meta)
296298
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.
297299

298300
<p align="center">
299-
<img src="../img/mov10_default_heatmap.png" width="600" alt="mov10 heatmap with default settings"/>
301+
302+
<img src="../img/mov10_default_heatmap.png" alt="mov10 heatmap with default settings" width="600"/>
303+
300304
</p>
301305

302306
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.

0 commit comments

Comments
 (0)