Skip to content

Commit e5215e4

Browse files
committed
Add "catch up script" to beginning of lesson
1 parent b00bedc commit e5215e4

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

lessons/wk6_lesson05_deseq2_analysis.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Gene-level differential expression analysis with DESeq2"
33
author: "Harvard HPC Staff, Adapted by Sally Chang at NICHD"
4-
date: "Last Modified March 2025"
4+
date: "Last Modified May 2025"
55
---
66

77
Approximate time: 60 minutes
@@ -13,6 +13,31 @@ Approximate time: 60 minutes
1313
- Inspect gene-level dispersion estimates
1414
- Recognize the importance of dispersion during differential expression analysis
1515

16+
## Catch-Up Script
17+
18+
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.
19+
20+
``` r
21+
# Setup
22+
# Bioconductor and CRAN libraries used - already installed on Biowulf
23+
library(tidyverse)
24+
library(RColorBrewer)
25+
library(DESeq2)
26+
library(pheatmap)
27+
library(BiocManager)
28+
29+
# Load in data
30+
data <- read.table("data/mov10_AllSamples_featurecounts.Rmatrix.txt", header=T, row.names=1)
31+
32+
meta <- read.table("data/mov10_AllSamples_metadata.txt", header=T, row.names=1)
33+
34+
# Create DESeq2Dataset object
35+
dds <- DESeqDataSetFromMatrix(countData = data, colData = meta, design = ~ sampletype)
36+
37+
# Run DESeq2 on DESeq2Dataset object
38+
dds <- DESeq(dds)
39+
```
40+
1641
## DESeq2 differential gene expression analysis workflow
1742

1843
Previously, we created the DESeq2 object using the appropriate design formula and running DESeq2 using the two lines of code:

0 commit comments

Comments
 (0)