<p>See the second example from <a href="https://bioconductor.org/packages/3.7/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#model-matrix-not-full-rank" rel="nofollow noreferrer">the vignette</a>, which is exactly your situation. The software cannot differentiate between the batch effects vs. condition effects because the groups are exactly the same.</p>

CC BY-SA 3.0
2018-02-08T23:01:45.747Z
cannnot re do the experiment, use the nested column is it?
novicebioinforesearcher
CC BY-SA 3.0
2018-02-08T23:15:55.403Z
elegantly explained just had to a little more search, can i delete this question?
novicebioinforesearcher
CC BY-SA 3.0
2018-02-09T00:49:04.390Z
Sorry, I don't understand your question in the first comment. Sure, you can delete it if you'd like.
Ken S.
CC BY-SA 3.0
2018-02-09T04:34:59.833Z
no the link you posted has accurate answer, i had to do a little more research before posting a question how should i design was my question
novicebioinforesearcher
CC BY-SA 3.0
2018-02-08T22:56:08.313Z
2018-02-09T08:19:05.103Z
2018-02-09T08:19:05.103Z
Ken S.
<p>Trying to use deseq2 for differential expression analysis (rna-seq) between three groups and also account for batch effect as the control were sequenced at a different time point.</p>

<ol>
<li>control: con </li>
<li>sample with mutation A: mutA </li>
<li>sample with mutation B: mutB</li>
</ol>

<p>here is my design </p>

<pre><code>   sample condition batch
1     C_1         con     1
2     C_2         con     1
3     C_5         con     1
4     C_3         con     1
5     C_4         con     1
6     M_6        mutA     2
7     M_2        mutA     2
8     M_5        mutA     2
9     M_1        mutA     2
10    M_4        mutA     2
11    M_3        mutA     2
12   MA_2        mutB     2
13   MA_6        mutB     2
14   MA_5        mutB     2
15   MA_4        mutB     2
16   MA_3        mutB     2
17   MA_1        mutB     2 
</code></pre>

<p>when i create matrix:</p>

<pre><code>dds &lt;- DESeqDataSetFromMatrix(countData = data, colData = coldata, design = ~batch + condition)
</code></pre>

<p>I see this error:</p>

<pre><code>Error in checkFullRank(modelMatrix) : 
  the model matrix is not full rank, so the model cannot be fit as specified.
  One or more variables or interaction terms in the design formula are linear
  combinations of the others and must be removed.
</code></pre>

<p>I also tried to compare only two conditions subsetting the original data, i still see the same error what am i missing?</p>

CC BY-SA 4.0
2023-03-11T07:44:46.800Z
can you please post the format which ran successfully in DESeq. I have a similar issue
Anubrata Das
<rna-seq><deseq2>
Error in checkFullRank(modelMatrix) deseq2
# Error in checkFullRank(modelMatrix) deseq2

(Asked by: username_0 on 2018-02-08)

Trying to use deseq2 for differential expression analysis (rna-seq) between three groups and also account for batch effect as the control were sequenced at a different time point.

control: con 
sample with mutation A: mutA 
sample with mutation B: mutB

here is my design 
   sample condition batch
1     C_1         con     1
2     C_2         con     1
3     C_5         con     1
4     C_3         con     1
5     C_4         con     1
6     M_6        mutA     2
7     M_2        mutA     2
8     M_5        mutA     2
9     M_1        mutA     2
10    M_4        mutA     2
11    M_3        mutA     2
12   MA_2        mutB     2
13   MA_6        mutB     2
14   MA_5        mutB     2
15   MA_4        mutB     2
16   MA_3        mutB     2
17   MA_1        mutB     2 

when i create matrix:
dds <- DESeqDataSetFromMatrix(countData = data, colData = coldata, design = ~batch + condition)

I see this error:
Error in checkFullRank(modelMatrix) : 
  the model matrix is not full rank, so the model cannot be fit as specified.
  One or more variables or interaction terms in the design formula are linear
  combinations of the others and must be removed.

I also tried to compare only two conditions subsetting the original data, i still see the same error what am i missing?

**Tags:** rna-seq, deseq2
> **Comments:**
> **username_1**: can you please post the format which ran successfully in DESeq. I have a similar issue  

---

## 1 answers

### Answer by username_2 on 2018-02-08. Score: 4 | Accepted answer

See the second example from [the vignette](https://bioconductor.org/packages/3.7/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#model-matrix-not-full-rank), which is exactly your situation. The software cannot differentiate between the batch effects vs. condition effects because the groups are exactly the same.

> **Comments:**
> **username_0**: cannnot re do the experiment, use the nested column is it?  
> **username_0**: elegantly explained just had to a little more search, can i delete this question?  
> **username_2**: Sorry, I don't understand your question in the first comment. Sure, you can delete it if you'd like.  
> **username_0**: no the link you posted has accurate answer, i had to do a little more research before posting a question how should i design was my question  

---

