I have a gene-expression (GE) data for 100 patients at 2 different time (Before & After). So, each patient has 2 samples.
Patients were under 2 treatment (treatA & treatB). I would like to to find the differential gene expression for the following contrast:
con <- makeContrasts(diff=(treatA_before-treatB_Before)-(treatA_After-treatB_After), levels=design)
However, I also would like to adjust my model for 4 covarites (age, sex, center, BMI) and also remove batch effect. So, I used the following design matrix:
time <- rep(c("Before", "After"), c(ncol(GE_before), ncol(GE_after)))
Could you please let me know that my design model is correct? can I remove the batch effect using this linear model. please advise. Thanks