I am experiencing problems with adding covariates to my paired samples design in DESeq2. We have 39 paired samples of human subjects (39 untreated samples; 39 treated samples). So in summary, it is a ‘time series’ experiment with paired samples. We are interested in the effects of treatment on gene expression.
Based on the information available in the DESeq2 vignette, I created the following design:
~ patientID + treatment
(where patientID is a factor with 39 levels indicating the paires and treatment is a factor with 2 levels: baseline/post treatment).
This design works perfectly. However, when including additional covariates to this formula I am experiencing problems.
We also want to adjust our data for covariates which are known to influence gene expression in humans, i.e. age (numeric), smoking status (factor with 2 levels: current smoking/ non smoking) and gender (factor with 2 levels). The design I have created is as follows:
~ patientID + age + currentsmoking + gender + treatment
However, when including these covariates I get the following error:
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 realized that this error occurs because the variable patientID is 100% correlated with the additional covariates, and therefore it is not possible to run this analysis. Is there a way to include covariates in a paired sample design in DESeq2? I hope you can help me out.