<p>The problem with most of the methods is that use the gene's variance for each group, which can't be calculated (reliable) when the sample is &lt;= 2. Also, statistically, it would have extremely low power, so the conclusions couldn't be trusted much. </p>

<p>You could also calculate the "raw" fold change by yourself (ie without the variance estimation and adjusting). If you had one more sample per group you could use <a href="https://bioconductor.org/packages/DESeq2" rel="nofollow noreferrer">DESeq2</a> which was <a href="https://genomebiology.biomedcentral.com/articles/10.1186/s13059-014-0550-8" rel="nofollow noreferrer">thought</a> for such cases. But from the paper:</p>

<blockquote>
  <p>However, if there are two or fewer replicates for a condition, these samples do not contribute to outlier detection, as there are insufficient replicates to determine outlier status.</p>
</blockquote>

<p>Which makes me unsure if it will work well for just two samples as it won't help to detect outliers genes. </p>

CC BY-SA 4.0
2018-05-24T15:51:34.953Z
Thanks. I updated my question. In particular, I was thinking about using your suggestion and just take the raw fold-change. Is it correct to take genes that are considered outliers (e.g. > 3 StD) when comparing the group to the rest of samples?
gc5
CC BY-SA 4.0
2018-05-24T15:59:01.840Z
The problem with such a few number of samples is that it is hard to know what is an outlier and what it is "normal". If you compare 2 vs 15 you still have two problems. 1) you still need to calculate the variance for the group of 2, which has the same problem as initially and 2) the comparison will be meaningful? If you considered them to be different groups is with a reason, if you mix them it will help you to understand what are the differences between them?
llrs
CC BY-SA 4.0
2018-05-24T15:59:06.740Z
You could show the samples and the relevant data about these samples (which groups, do they belong, if they are biological or technical replicates or the differences between the conditions, ...) to help you better.
llrs
CC BY-SA 4.0
2018-05-24T16:17:23.817Z
The dataset I'm using is this one on GEO (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE109125). There's no citation yet and I didn't find in the metadata if they are biological or technical replicates. However, I think they are biological replicates. The group is the first part of sample name (before the '#' sign). The full normalized matrix can be downloaded here: ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE109nnn/GSE109125/suppl/GSE109125%5FGene%5Fcount%5Ftable%2Ecsv%2Egz
gc5
CC BY-SA 4.0
2018-06-08T19:27:50.793Z
This may sound obvious, but can you provide some context in the answer on why the variance cannot be calculated reliable when the sample is <= 2?
gc5
CC BY-SA 4.0
2018-06-11T08:50:31.130Z
@gc5 With less than 2 you don't have variance, and with just 2 it is not good enough, as it is defined by the difference between the points and the mean, and if you add another point you add 33% more data! But that would be a good question for stats.SE, who could give a more reasonable and detailed answer than me :\
llrs
CC BY-SA 4.0
2018-05-24T14:43:57.423Z
2018-05-24T14:43:57.423Z
llrs
<p>While I share Llopis' concern about estimating variance from 2 samples, the statement you quoted is about avoiding false positives from genes that are only expressed in a few samples. It's fairly common to exclude genes that expressed in fewer samples than the smallest group even if the number of samples per group is much higher than 3.</p>

CC BY-SA 4.0
2018-05-24T16:11:13.000Z
Good point, thanks. I also think the sentence meant that in this specific case.
gc5
CC BY-SA 4.0
2018-05-24T16:07:55.560Z
2018-05-24T16:07:55.560Z
heathobrien
<p>I am reading Smyth et al. (ref. 1). I want to run differential expression analysis on a bulk RNA-Seq dataset in which each group is composed by 2 samples. In the paper previously cited it is written that:</p>

<blockquote>
  <p>Genes must be expressed in at least one group (or in at least three samples across the entire experiment, where <strong>three was chosen as this is the smallest group size</strong>) to be kept for downstream analysis.</p>
</blockquote>

<p>Is it possible to use limma DE analysis also with groups composed by only 2 samples? NB. It is possible that in this particular dataset the smallest group size is 3.</p>

<p>If not, which alternative should I use?</p>

<h3>Update</h3>

<p>I have 17 samples. My idea is to test one group vs the rest of groups (all together). So at least the reference group would be composed by > 10 samples. In this case, what can be a feasible analysis for DE?</p>

<ol>
<li>Smyth, G. K., Law, C. W., Alhamdoosh, M., Su, S. &amp; Ritchie, M. E. <a href="https://f1000research.com/articles/5-1408/v2" rel="noreferrer">RNA-seq analysis is easy as 1-2-3 with limma, Glimma and edgeR</a>. F1000Research 5, 1408 (2016).</li>
</ol>

<rna-seq><differential-expression><limma>
Smallest group size for differential expression in limma (bulk RNA-Seq)
# Smallest group size for differential expression in limma (bulk RNA-Seq)

(Asked by: username_0 on 2018-05-24)

I am reading Smyth et al. (ref. 1). I want to run differential expression analysis on a bulk RNA-Seq dataset in which each group is composed by 2 samples. In the paper previously cited it is written that:

> Genes must be expressed in at least one group (or in at least three samples across the entire experiment, where **three was chosen as this is the smallest group size**) to be kept for downstream analysis.

Is it possible to use limma DE analysis also with groups composed by only 2 samples? NB. It is possible that in this particular dataset the smallest group size is 3.

If not, which alternative should I use?

### Update

I have 17 samples. My idea is to test one group vs the rest of groups (all together). So at least the reference group would be composed by > 10 samples. In this case, what can be a feasible analysis for DE?

1. Smyth, G. K., Law, C. W., Alhamdoosh, M., Su, S. & Ritchie, M. E. [RNA-seq analysis is easy as 1-2-3 with limma, Glimma and edgeR](https://f1000research.com/articles/5-1408/v2). F1000Research 5, 1408 (2016).

**Tags:** rna-seq, differential-expression, limma

---

## 2 answers

### Answer by username_1 on 2018-05-24. Score: 3 | Accepted answer

The problem with most of the methods is that use the gene's variance for each group, which can't be calculated (reliable) when the sample is <= 2. Also, statistically, it would have extremely low power, so the conclusions couldn't be trusted much.

You could also calculate the "raw" fold change by yourself (ie without the variance estimation and adjusting). If you had one more sample per group you could use [DESeq2](https://bioconductor.org/packages/DESeq2) which was [thought](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-014-0550-8) for such cases. But from the paper:

> However, if there are two or fewer replicates for a condition, these samples do not contribute to outlier detection, as there are insufficient replicates to determine outlier status.

Which makes me unsure if it will work well for just two samples as it won't help to detect outliers genes.

> **Comments:**
> **username_0**: Thanks. I updated my question. In particular, I was thinking about using your suggestion and just take the raw fold-change. Is it correct to take genes that are considered outliers (e.g. > 3 StD) when comparing the group to the rest of samples?  
> **username_1**: The problem with such a few number of samples is that it is hard to know what is an outlier and what it is "normal". If you compare 2 vs 15 you still have two problems. 1) you still need to calculate the variance for the group of 2, which has the same problem as initially and 2) the comparison will be meaningful? If you considered them to be different groups is with a reason, if you mix them it will help you to understand what are the differences between them?  
> **username_1**: You could show the samples and the relevant data about these samples (which groups, do they belong, if they are biological or technical replicates or the differences between the conditions, ...) to help you better.  
> **username_0**: The dataset I'm using is this one on GEO (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE109125). There's no citation yet and I didn't find in the metadata if they are biological or technical replicates. However, I think they are biological replicates. The group is the first part of sample name (before the '#' sign). The full normalized matrix can be downloaded here: ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE109nnn/GSE109125/suppl/GSE109125%5FGene%5Fcount%5Ftable%2Ecsv%2Egz  
> **username_0**: This may sound obvious, but can you provide some context in the answer on why the variance cannot be calculated reliable when the sample is <= 2?  
> **username_1**: @gc5 With less than 2 you don't have variance, and with just 2 it is not good enough, as it is defined by the difference between the points and the mean, and if you add another point you add 33% more data! But that would be a good question for stats.SE, who could give a more reasonable and detailed answer than me :\  

---

### Answer by username_2 on 2018-05-24. Score: 3

While I share Llopis' concern about estimating variance from 2 samples, the statement you quoted is about avoiding false positives from genes that are only expressed in a few samples. It's fairly common to exclude genes that expressed in fewer samples than the smallest group even if the number of samples per group is much higher than 3.

> **Comments:**
> **username_0**: Good point, thanks. I also think the sentence meant that in this specific case.  

---

