With DESeq2 "Not full rank" Error with design
1
0
Entering edit mode
feather-W • 0
@ab4cafbd
Last seen 3 months ago
China

Hi,

I would like to use DESeq2 for the analysis of the differential expressed gene during the tumor development. I got the expected cell number of tumor tissue and I want to add the cell number to design as covariate, and the colData as follows:


> coldata
           batch time type cell_num   group
0d-Mut2        2   0d  mut   1289.6  mut_0d
0d-Mut3        2   0d  mut   1523.8  mut_0d
10d-Mut3_2     2  10d  mut   1478.4 mut_10d
8W-Mut2_2      2   8w  mut   4315.8  mut_8w
10d-Mut1       1  10d  mut   1708.4 mut_10d
10d-Mut2       1  10d  mut     1463 mut_10d
10d-Mut3       1  10d  mut   1478.4 mut_10d
4W-Mut1        1   4w  mut   3499.6  mut_4w
4W-Mut2        1   4w  mut   2890.4  mut_4w
4W-Mut3        1   4w  mut   3742.2  mut_4w
8W-Mut1        1   8w  mut   5281.6  mut_8w
8W-Mut2        1   8w  mut   4315.8  mut_8w
8W-Mut3        1   8w  mut   4420.6  mut_8w

And the design formula as follow:

dds <- DESeqDataSetFromMatrix(dat_filtered, coldata, design=~batch+cell_num+group)

But I encountered an error as follow:

> dds <- DESeqDataSetFromMatrix(dat_filtered, coldata, design=~batch+cell_num+group)
converting counts to integer mode
factor levels were dropped which had no samples
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.

  Please read the vignette section 'Model matrix not full rank':

  vignette('DESeq2')

I want to know if smoebody can solve this error? And "cell_number" is important for me, so I need to add it to design.

Thank you in advance for your reply!

Best regards

DESeq2 DEs • 495 views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 1 day ago
United States

I'd recommend using RUV instead of batch here, as it is correlated with your design. RUV helps to estimate batch variation and you can then add those variables into the design instead of batch. See our workflow for code examples.

For cell number, you should center and scale this variable first then put the center scaled variable in the design.

ADD COMMENT
0
Entering edit mode

Hi, Michael, thanks for your help very much! Best wishes to you.

ADD REPLY

Login before adding your answer.

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