DESeq2 says my sampleinfo has linear combination error but I don't see it...
1
0
Entering edit mode
Joon Ho • 0
@42c7b3f4
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)
dds

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
ADD COMMENT
1
Entering edit mode
swbarnes2 ★ 1.2k
@swbarnes2-14086
Last seen 20 hours ago
San Diego

Are your AOD values factors?

ADD COMMENT
0
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!

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
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.

ADD REPLY

Login before adding your answer.

Traffic: 272 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