Is there a way to solve "the model matrix is not full rank", when just one of my sample is showing batch effect?
1
0
Entering edit mode
Jung E. Ji • 0
@7071ea92
Last seen 15 months ago
South Korea

Hi everyone, I currently have a dataset of 6 samples. The experimental design is 3 conditions, with 2 samples in each condition.

Therefore, my coldata table looks like this:

Samp_ID   Condition      
S1        Cond_1   
S2        Cond_1    
S3        Cond_2 
S4        Cond_2  
S5        Cond_3 
S6        Cond_3

S1 is showing a batch effect compared to all the other samples, and therefore my PCA plot comes out like this. enter image description here

I wanted to control this batch effect, so I set my design like this.

dds <- DESeqDataSetFromMatrix(countdata, 
                              colData = coldata, 
                              design = ~ S_ID + Condition)

However, I got the 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 understand that this error is because my samples are nested within the condition groups. However, even after I read the manual I am not sure how to redesign my data to account for each samples

I appreciate any suggestions or input you can give me. Thank you in advance!

DESeq2 • 370 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

You cannot account for sample specific differences if they were also nested within the condition. In other words, you cannot fix this experiment, but can only fit the model with either sample or condition, but not both. The only way you could include both is if sample were not nested within the condition.

ADD COMMENT

Login before adding your answer.

Traffic: 397 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6