Hello! I have an experiment involving the comparison of protein abundance of drug-treated cells with the control group for the course of 1, 2, 3, 4 and 5 hours. As I understand, the "9.6.2 Many time points" section of the Limma user guide fits my experiment design, and I am using the following formula for design:
design <- model.matrix(~0+groups*times)
where groups is:
groups <- as.factor(experimental_design$group) # Either Treatment or CNTR
and times is:
times <- ns(experimental_design$time, df=4) # Natural splines based on a column with 1/2/3/4/5 hour indicator
Afterwards, I fit the model and its coefficients as described in the guide:
fit <- lmFit(proteins, design)
fit <- eBayes(fit)
topTable(fit, coef=8:12)
However, the code from the user guide does not tell me the log fold changes of those proteins. Thus, I wonder if it is correct to apply the following contrast to my design:
contrast <- makeContrasts(
(Treatement + Treatment_2 + Treatment_3 + Treatment_4 + Treatment_5)/5 - CNTR,
levels = colnames(design)
)
and then extract log fold changes from:
fit <- lmFit(proteins, design)
fit2 <- contrasts.fit(fit, contrast)
fit2<- eBayes(fit2)
topTable(fit2)
Many thanks for your time reading this post!
Do you have replicate samples for each treatment at each time?
Yes, I have 6 replicas (samples) for each treatment time (5* 6 = 30 treatment samples in total) and 6 samples for the Control.