[DESeq2] Question regarding experiment design with multiple nesting and variables
1
0
Entering edit mode
@christophevanhaver-21827
Last seen 3.5 years ago
Belgium

Dear folks,

I have some issue about my experimental design with DESeq2. Here is my conditions:

I have 13 patients (01:13) with two different types of cancer, A (n = 8) and B (n=5). From these patient, we isolate three "cell type" (X, Y and Z).

I would like to compare the different "cell types" against each other while taking into account the "patient" and the "disease" effect.

Here is a simplified version of the annot_file with less samples (dis = Disease, cell = Cell group, ptn = Patient).

samp <- c(1:10)
dis <- c(rep("A", each = 5), rep("B", each = 5))
cell <- rep(c(rep(c("X","Y"), each =1, times=2), "Z"), times=2)
ptn <- c(rep("01", times=2), rep("02", times=3), rep("03", times=2), rep("04", times=3))
df <- data.frame(samp,dis,cell,ptn)

As you can see, some patient has the three cell type isolated while other only have two. I don't really know if this is an unsolvable issue for DESeq2.

Anyway, I added a column called "patient.nested" as I've seen on different forum. The final table should look like this (example):

samp <- c(1:10)
dis <- c(rep("A", each = 5), rep("B", each = 5))
cell <- rep(c(rep(c("X","Y"), each =1, times=2), "Z"), times=2)
ptn <- c(rep("01", times=2), rep("02", times=3), rep("03", times=2), rep("04", times=3))
df <- data.frame(samp,dis,cell,ptn)
df$ptn.nested <- rep(c("1", "1", "2", "2", "2"), times=2)
df

I've tried the following design then: ~ dis + dis:ptn.nested + dis:cell but I still have this issue :

Error in checkFullRank(modelMatrix) : the model matrix is not full rank, so the model cannot be fit as specified. Levels or combinations of levels without any samples have resulted in column(s) of zeros in the model matrix. Please read the vignette section 'Model matrix not full rank': vignette('DESeq2')

What I am doing wrong and how can I fix it (if there is a way to fix it...).

Many thanks !

Chris

DESeq2 nesting design • 861 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 5 days ago
United States

"I would like to compare the different "cell types" against each other while taking into account the "patient" and the "disease" effect."

Just control for patient. This has been discussed on the forum a number of times before but it's perhaps hard to find those posts. When you control for patient, you don't also attempt to control for disease, because patient is a higher resolution than disease. The same applies to designs with patient and sex, as patients are nested within sex, you cannot _additionally_ control for sex if you control for patient.

ADD COMMENT

Login before adding your answer.

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