# Plan an RNA-seq differential expression analysis

A reproducible, step-by-step RNA-seq workflow from raw reads to differentially expressed genes, with QC checkpoints and common pitfalls flagged.

- Topic: Data & Analysis
- Framework: Few-Shot
- Level: Standard
- Tags: Coding, Analyze, Plan, Fill-in Template
- Source: https://www.thinkwithprompt.com/prompts/plan-an-rna-seq-differential-expression-analysis

## Prompt

```text
Help me plan and run an RNA-seq differential gene expression analysis.

**Organism and reference:** [e.g. "human, GRCh38 + GENCODE"]
**Experimental design:** [conditions, number of biological replicates per group, any batches, paired samples]
**Library and sequencing:** [polyA or rRNA-depleted, stranded or not, single or paired-end, read length, depth]
**Data I have now:** [raw FASTQ / count matrix / aligned BAMs]
**Tools and environment:** [R, Python, command line, HPC, Galaxy]
**Main question:** [e.g. "which genes change between treated and control at 24h"]

Give me:
1. **Design check:** whether my replicates and batches support the comparison I want, and the design formula to use (e.g. ~ batch + condition).
2. **Workflow** with a recommended tool at each step and why: QC (FastQC/MultiQC), trimming if needed, alignment or pseudo-alignment, quantification, import into R.
3. **QC checkpoints:** what to look at (mapping rate, library size, PCA, sample clustering, outliers) and what values should worry me.
4. **Differential expression:** DESeq2 or edgeR/limma-voom for my design, filtering low counts, shrinkage of fold changes, multiple testing correction, and how to set thresholds.
5. **Visualization:** PCA, MA plot, volcano plot, heatmap of top genes, with example code.
6. **Next steps:** enrichment analysis options and how to interpret them cautiously.
7. **Pitfalls:** confounded batches, too few replicates, using normalized counts as input to DESeq2, over-reading p-values.

Write code in [R/Python] with comments, and keep everything scripted so the analysis is reproducible. Do not invent results; tell me what to check in my own output.
```

## What to fill in

- e.g. "human, GRCh38 + GENCODE"
- raw FASTQ / count matrix / aligned BAMs
- R, Python, command line, HPC, Galaxy
- e.g. "which genes change between treated and control at 24h"
- R/Python

Free to copy and use. From ThinkWithPrompt (https://www.thinkwithprompt.com/), a library of 2,663 curated AI prompts.
