DESeq2 says my sampleinfo has linear combination error but I don't see it...
Entering edit mode
Joon Ho • 0
Last seen 11 days ago
United States

Hi guys, I am trying to run DE test with and would like to assign Age of Death (AOD) into the design function. My sampleinfo looks like this...(pretty simple really..)

Sample  Treatment   AOD
1   Low 98
2   Low 97
3   Low 87
4   Intermediate    80
8   Intermediate    77
9   Low 83
10  Low 92
11  Low 102
12  High    58
13  High    75
14  High    90
15  High    84
16  Intermediate    88
17  Control 82
18  Control 79
20  Control 87
24  Control 95
25  High    89
26  Intermediate    68

and I am trying to run

dds <- DESeqDataSetFromMatrix(countData = round(count),
                              colData = coldata,
                              design = ~  AOD+Treatment)

and I get

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 read the vignette and checked if I had linear combinations, but I can't seem to find it... I have been going nuts over this for the past 2 hours can anyone help me please? Thanks!

DESeq2 • 123 views
Entering edit mode
swbarnes2 ★ 1.2k
Last seen 20 hours ago
San Diego

Are your AOD values factors?

Entering edit mode

Yes, I converted into factors by using

coldata$AOD <- as.factor(coldata$AOD)

when I remove AOD and perform design = ~ Treatment, it works fine... What could cause this? Thanks!

Entering edit mode

Why did you make AOD into a factor? Do you understand what that does?

Entering edit mode

As suggested, you need to know better what you are trying to do. Converting AOD to factor means that each AOD become a caterogical variable and each AOD value is a unique category. If you convert it to factor (maybe you need it but I do not enough about know your experiment and statistical design), then absolutely your design matrix is not full rank because for each AOD value, a unique Treatment is possible. You need to better explain your experiment and your assumptions.


Login before adding your answer.

Traffic: 272 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6