Question: DESeq2 Design controlling for gender
gravatar for rejane.troudet
9 months ago by
rejane.troudet0 wrote:


I’m working with RNA-seq dataset and I’m using DESeq2 (v 1.10) with complex experimental designs.

I have several variables to work with :

  • Visite : 2 levels (before and after treatment)
  • Patients : Responders and Non-responders, female and male
  • Batch : paired samples are in different batches

For example :

Patient Batch Paired.patient visite Gender Response
101 B1 1 VA male R
101 B1 1 VB male R
102 B1 2 VA male  NR
102 B1 2 VB male NR
103 B2 1 VA female R
103 B2 1 VB female R
104 B2 2 VA male R
104 B2 2 VB male R
105 B3 1 VA female NR
105 B3 1 VB female NR

The aims of the experiment is to

  • identify a list genes differentially expressed after treatment (comparing before and after treatment)
  • compare the 2 lists of genes in responders and non responders in order to find specific genes for each group

To do that, I did a paired analysis to compare before versus after treatment and I’ve used this formula for responders (and the same formula for non-responders separately) :

~ model.matrix(~ Paired.patient + visite, data=pheno_R)

I didn’t correct for batch effect in this experiment because I’m comparing only the paired samples in a same batch. Then when I try to add a control for gender effect with this formula :

~ Gender + paired.patient + visite

I get this error message:

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’ve already managed this error message with the paired analysis in the past, but I dont’ know how to solve the problem with the variable Gender ?

Thanks for your help,


ADD COMMENTlink modified 9 months ago by Michael Love18k • written 9 months ago by rejane.troudet0
gravatar for Michael Love
9 months ago by
Michael Love18k
United States
Michael Love18k wrote:

You can make comparisons within each patient, and then you don't have to worry about batch or sex (inter-patient comparisons control for both of those differences).

So you just need a design with has a patient effect, and also splits the effect for responder and non-responders. Take a look at this section of the vignette:

ADD COMMENTlink written 9 months ago by Michael Love18k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 353 users visited in the last hour