<p>The first method (<code>resSig$log2FoldChange</code>) is for getting the most differentially expressed genes. These are the genes with the biggest differences between specific groups you pre-define.</p>

<p>The second method (<code>rowVars(assay(rld))</code>) is for getting the highly variable genes. These are the genes most variable across all samples regardless of which samples they are.</p>

CC BY-SA 3.0
2018-04-13T00:38:42.683Z
2018-04-13T00:38:42.683Z
burger
<p>In the following <a href="https://f1000research.com/articles/4-1070/v2" rel="nofollow noreferrer">article</a>. There are two ways of getting highly variable genes:</p>

<pre><code>resSig &lt;- subset(res, padj &lt; 0.1)
head(resSig[ order(resSig$log2FoldChange, decreasing=TRUE), ])
</code></pre>

<p>Getting genes that are statistically significant, then ordering them by the <code>log2FoldChange</code> which is </p>

<blockquote>
  <p>The column <em>log2FoldChange</em> is the effect size estimate. It tells us how much the gene’s expression seems to have changed due to treatment with dexamethasone in comparison to untreated samples.</p>
</blockquote>

<p>And the second one:</p>

<pre><code>topVarGenes &lt;- head(order(rowVars(assay(rld)),decreasing=TRUE),20)
</code></pre>

<p>I am struggling to understand what are the differences between the two ways of getting the most variable genes. What is the difference?</p>

<rna-seq><deseq2>
Highly variable genes analysis by DESeq2
# Highly variable genes analysis by DESeq2

(Asked by: username_0 on 2018-04-12)

In the following article. There are two ways of getting highly variable genes:
resSig <- subset(res, padj < 0.1)
head(resSig[ order(resSig$log2FoldChange, decreasing=TRUE), ])

Getting genes that are statistically significant, then ordering them by the log2FoldChange which is 

The column log2FoldChange is the effect size estimate. It tells us how much the gene’s expression seems to have changed due to treatment with dexamethasone in comparison to untreated samples.

And the second one:
topVarGenes <- head(order(rowVars(assay(rld)),decreasing=TRUE),20)

I am struggling to understand what are the differences between the two ways of getting the most variable genes. What is the difference?

**Tags:** rna-seq, deseq2

---

## 1 answers

### Answer by username_1 on 2018-04-13. Score: 4 | Accepted answer

The first method (`resSig$log2FoldChange`) is for getting the most differentially expressed genes. These are the genes with the biggest differences between specific groups you pre-define.

The second method (`rowVars(assay(rld))`) is for getting the highly variable genes. These are the genes most variable across all samples regardless of which samples they are.


---

