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