This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DeSeq2 Matched Analysis

Hi,

I have an issue with my Deseq analysis that I can't solve. I'm trying to see if a clinical treatment can cause changes in RNA expression in human PBMCs. My data are organized as follows:

Data

It's an example since I have a total of 138 sample (69 IDs)

When I run the Deseq command: design = ~ ID + Batch + Comparison

I obtained the 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 can't understand why I can't insert the batch as variable.

Thank you.

rnaseq de deseq2

1 answer

You cannot fit ID and Batch at the same time. Batch1+2 are nested with ID 1,2,3 while batch 3 is neted with ID4+5. Given that this is a paired analysis fitting ~ID+Comparison should be what you need (and is basically the only think you can do). If you fit ~batch+comparison that you lose the pairing information which is probably critical here.

oh, I see. I avoid the eventual batch effect since I'm doing a paired analysis.

Log in to answer this question.