I got my differential gene expression tables from RNAseq data already processed by another person and would like to perform predictive model analysis from a list of genes. I was advised before to use my normalized read count matrix (columns=samples, rows=genes) for rlog or VST transformations before building the model. However, I do not manage to use the DESeqDataSetFromMatrix function due to invalid design before rlog or VST.
I have 4 groups of samples:
1) healthy controls: no disease, no treatments
2) active untreated samples: active disease, no treatments
3) inactive treated samples: inactive disease, treated
4) active refractory samples: active disease, treatment was not successful and they stopped this treatment
I would like to obtain 2 different predictive models: one for genes that could predict the response (or not) to treatment (prediction between groups 3 and 4), and the other one for genes that could predict the relapse of symptoms or, in another way, what is the treatment not treating (prediction between groups 1 and 3).
Thus, I am trying to process all data at once with DESeqDataSetFromMatrix to subsequently apply rlog or VST. I wrote a design table in different ways but always gives me back the 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')
However, I do not fully understand the information there and this is why I am asking for support. This is the code I wrote for the design as if I had 2 samples per group. I am not sure whether suppressing Disease would be correct....
my_design <- data.frame(row.names = colnames(test),
Disease = c(rep("no", 2), rep("yes", 6)),
Activity = c(rep("no", 2), rep("yes", 2), rep("no", 2), rep("yes", 2)),
Treatment = c(rep("no", 4), rep("yes", 2), rep("no", 2)))
my_cds <- DESeqDataSetFromMatrix(test, my_design, ~ Disease + Activity + Treatment)