Question: DESeq2 "Not full rank" Error
0
gravatar for Cecelia
7 months ago by
Cecelia10
Cecelia10 wrote:

Hi,

I've got an error in a DESeq2 analysis with the model design. I have a treatment vs. control set-up with different time points.

Code:

ddsTCpus14 <- DESeqDataSetFromTximport(txifilesevipus14, colData=colDatapus,
                                  design = ~ Treatment + Time + Year +  Treatment:Time)

Coldata:

X,Time,Treatment,Year
Treat_1h_rep1,1h,Treat,Late
Treat_1h_rep2,1h,Treat,Late
Treat_1h_rep3,1h,Treat,Late
Control_1h_rep1,1h,Control,Late
Control_1h_rep2,1h,Control,Late
Control_1h_rep3,1h,Control,Late
Treat_4h_rep1,4h,Treat,Late
Treat_4h_rep2,4h,Treat,Late
Treat_4h_rep3,4h,Treat,Late
Control_4h_rep1,4h,Control,Late
Control_4h_rep2,4h,Control,Late
Control_4h_rep3,4h,Control,Late
Treat_12h_rep1,12h,Treat,Early
Treat_12h_rep2,12h,Treat,Early
Treat_12h_rep3,12h,Treat,Early
Control_12h_rep1,12h,Control,Early
Control_12h_rep2,12h,Control,Early
Control_12h_rep3,12h,Control,Early

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 guess it is because the condition Year is nested in Time? The aim of adding Year as a condition is to specify some samples were sequenced one year early than the others. Is there some other ways to remove the effect?

Cheers, C.

design deseq2 • 418 views
ADD COMMENTlink modified 7 months ago by swbarnes24.6k • written 7 months ago by Cecelia10

I guess it is because the condition Year is nested in Time?

Yes. See these posts for workarounds:

https://support.bioconductor.org/p/64844/

https://support.bioconductor.org/p/64480/

The aim of adding Year as a condition is to specify some samples were sequenced one year early than the others. Is there some other ways to remove the effect?

You mean Year is a batch effect?

ADD REPLYlink written 7 months ago by h.mon22k
0
gravatar for swbarnes2
7 months ago by
swbarnes24.6k
United States
swbarnes24.6k wrote:

I guess it is because the condition Year is nested in Time?

Yes. You have no way at all of knowing if the 12 hour samples are different from the others because of time, or because of time of year. I think you are going to have to drop time of year as a factor, and just keep in mind that you have unremovable batch effects of who knows what magnitude in the 12 hour samples.

ADD COMMENTlink written 7 months ago by swbarnes24.6k
Please log in to add an answer.

Help
Access

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