<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Basics of DESeq2: Differential Expression Made Simple]]></title>
	<link>https://bioinformaticsonline.com/blog/view/44803/basics-of-deseq2-differential-expression-made-simple?</link>
	<atom:link href="https://bioinformaticsonline.com/blog/view/44803/basics-of-deseq2-differential-expression-made-simple?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/blog/view/44803/basics-of-deseq2-differential-expression-made-simple</guid>
	<pubDate>Wed, 28 May 2025 06:47:32 -0500</pubDate>
	<link>https://bioinformaticsonline.com/blog/view/44803/basics-of-deseq2-differential-expression-made-simple</link>
	<title><![CDATA[Basics of DESeq2: Differential Expression Made Simple]]></title>
	<description><![CDATA[<p>DESeq2 is a powerful and widely-used R package that identifies differentially expressed genes (DEGs) from RNA-seq data. Whether you're comparing treated vs untreated samples, disease vs healthy conditions, or wild-type vs mutant strains, DESeq2 helps you statistically determine which genes are significantly up- or down-regulated.</p><p><strong>What Does DESeq2 Do?</strong><br />DESeq2 analyzes count data&mdash;the number of sequencing reads that map to each gene. It:</p><p>Normalizes the data to account for sequencing depth and library size.</p><p>Estimates variance (dispersion) for each gene.</p><p>Fits a model to compare groups (e.g., control vs treated).</p><p>Calculates fold-changes and p-values to determine significance.</p><p><strong>Installing DESeq2</strong></p><p><br />You can install DESeq2 via Bioconductor in R:</p><p>if (!requireNamespace("BiocManager", quietly = TRUE))<br /> install.packages("BiocManager")<br />BiocManager::install("DESeq2")</p><p><br />Inputs Needed</p><p><br />A count matrix: genes as rows, samples as columns (raw counts, not normalized).</p><p>A sample metadata table (also called colData): defines the condition/group for each sample.</p><blockquote><p>Example:<br /># Count matrix (rows = genes, columns = samples)<br />counts &lt;- read.csv("counts.csv", row.names = 1)</p><p># Sample metadata<br />colData &lt;- data.frame(<br /> row.names = colnames(counts),<br /> condition = c("control", "control", "treated", "treated")<br />)</p><p>DESeq2 Workflow</p><p>1. Load the package<br />library(DESeq2)<br />2. Create a DESeqDataSet object<br />dds &lt;- DESeqDataSetFromMatrix(countData = counts,<br /> colData = colData,<br /> design = ~ condition)<br />3. Run the differential expression analysis<br />dds &lt;- DESeq(dds)<br />4. Get the results<br />res &lt;- results(dds)<br />head(res)<br />This gives a table with:</p><p>log2FoldChange: how much expression changed</p><p>pvalue: statistical significance</p><p>padj: adjusted p-value (FDR corrected)</p></blockquote><p><strong>Visualization (Optional but Powerful)</strong></p><blockquote><p><br />MA Plot<br />plotMA(res, ylim = c(-2, 2))</p><p>Volcano Plot (custom)<br />library(ggplot2)<br />res$significant &lt;- res$padj &lt; 0.05<br />ggplot(res, aes(x=log2FoldChange, y=-log10(padj), color=significant)) +<br /> geom_point() +<br /> theme_minimal()</p><p>Heatmap of Top Genes<br />library(pheatmap)<br />topgenes &lt;- head(order(res$padj), 20)<br />vsd &lt;- vst(dds, blind=FALSE)<br />pheatmap(assay(vsd)[topgenes, ])</p><p>Tips for Best Results<br />Use raw counts (not normalized or TPM/RPKM values).</p><p>Have replicates: DESeq2 relies on variance estimates, so at least 3 per group is ideal.</p><p>Watch out for batch effects&mdash;include them in your design if needed (e.g., ~ batch + condition).</p></blockquote><p><strong>Summary</strong></p><p>Step Purpose<br />DESeqDataSetFromMatrix() Load your data into DESeq2<br />DESeq() Run the differential expression analysis<br />results() Extract the output (log fold change, p-values, etc.)<br />plotMA() / ggplot2 / pheatmap Visualize the results</p><p><strong>Final Thoughts</strong><br />DESeq2 is an essential tool for RNA-seq data analysis. It abstracts away much of the complexity of statistical modeling, while still giving you control when needed. Whether you're a bioinformatician or a wet-lab biologist, DESeq2 offers both ease of use and analytical power.</p><p>&nbsp;</p>]]></description>
	<dc:creator>LEGE</dc:creator>
</item>

</channel>
</rss>