This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to solve DESeq2 Error in checkFullRank(modelMatrix)?

I have 2 factors in the design formula in DESeq2

dds <- DESeqDataSetFromMatrix(countData=count_data, colData=coldata, design=~condition+timepoint)

but got an 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.

  Please read the vignette section 'Model matrix not full rank':

  vignette('DESeq2')

This is what my coldata looks like:

        condition  timepoint
HA  Healthy 0dpi    
HB  Healthy 0dpi        
HC  Healthy 0dpi        
I2A Infected    2dpi        
I2B Infected    2dpi        
I2C Infected    2dpi        
I4A Infected    4dpi        
I4B Infected    4dpi        
I4C Infected    4dpi        
I6A Infected    6dpi
I6B Infected    6dpi
I6C Infected    6dpi
I8A Infected    8dpi
I8B Infected    8dpi
I8C Infected    8dpi
W2A Wounding    2dpi        
W2B Wounding    2dpi        
W2C Wounding    2dpi        
W4A Wounding    4dpi        
W4B Wounding    4dpi        
W4C Wounding    4dpi        
W6A Wounding    6dpi
W6B Wounding    6dpi
W6C Wounding    6dpi
W8A Wounding    8dpi
W8B Wounding    8dpi
W8C Wounding    8dpi

Row name indicates the simplified sample name. I want to use Healthy as a control. Does anyone know how to solve this?

rna-seq deseq2

1 answer

See the section on non full rank design matrices in the DESeq2 manual.

In this case your problem is that healthy and 0dpi samples are exactly the same samples, so it is not possible to separate variance caused by "healthy" from variance caused by "0dpi"

Thank you so much for your response, and apologies for the delayed reply! Your explanation really clarified things—I’ll check out the section on non-full-rank design matrices in the DESeq2 manual. I really appreciate your help!

Log in to answer this question.