Hello All, I have an RNAseq experiment with paired samples (before and after treatment). For each sample, I also have metadata on the patient such as sex. The only comparison that I care about is the before and after treatment for each patient (ie I would just do paired t-tests if this were a simple qPCR experiment and not using a general linear model).
I am using DESeq.
The problem is that if I want to regress out potentially confounding variables relating to the patient, it becomes colinear because if each patient has two samples, both samples will have the sample value. For example, patient A_pre and patient A_post will both have sex dummy encoded to 1 because they are both male. For clarity, my design is
design=~ sex + patient + treatment
And the sex term should regress out the effect of sex, while the patient term should regress out the patient effect (making it more similar to a paired t test). I would later analyze pre vs post (treatment condition).
Here is an example from metadata"
sample Patient sex Condition A_post A 0 post A_pre A 0 pre B_post B 0 post B_pre B 0 pre C_post C 1 post C_pre C 1 pre
Would anyone have any advice on how to regress out both sex and patient in my experiment? Or is there a better way to analyze the data? Thank you in advance for all your help!
enter code here
Thank you!