Hi,
I'm a student and I have doubts about how use Limma to contrast the differencial gene expression evaluating my three variables: disease (case/control), gender(male/female) and age.
My data is like this: (three columns with the gender, age and the disease)
> head(pData(gse))
gender age disease
GSM311511_jrs_U201u5_AR2_31_B112_R12558.CEL.gz female 88 control
GSM311528_jrs_U201u5_AR2_33_B112_R92737.CEL.gz male 53 control
GSM311511_jrs_U201u5_AR2_31_B112_R97522.CEL.gz male 94 control
GSM311530_jrs_U201u5_AR2_55_B013_R97210.CEL.gz female 40 control
GSM311511_jrs_U201u5_AR2_31_B110_R95417.CEL.gz male 35 control
GSM311511_jrs_U201u5_AR2_31_B012_R97841.CEL.gz female 89 control
I know build my experiment over my variable disease:
design= model.matrix(~ pData(gse)[,"disease"])
colnames(design)= c("control", "case")
fit= lmFit(gse, fesign)
fit1= eBayes(fit)
topTable(fit1, coef=2, adjust="BH", number= as.numeric(dim(gse)[1]))
But, How I can do a contrast Limma with my 3 variables? Thank for your help!
age= pData(gse)[,"age"]
gender= pData(gse)[,"gender"]
disease= pData(gse)[,"disease"]
age.group= ifelse(age>40,"over40", "under40")
design = model.matrix(~0 + disease + gender + gender:age)
contr.matrix <- makeContrasts(
Thanks a lot for for your answer and helping me!!!!
However, I tried to follow your instructions, but I don't know how to build it well :-S
You're using a different design matrix from what you had in your original post, with a
gender:age.group
term rather thangender:age
. This results in more coefficients in your design matrix, which probably causes the error and warning that you've observed. Why not just use the original design matrix? A threshold of 40 seems arbitrary anyway.Again, many thanks for your useful help. I achieved results, and I understood and learned to do something else.
Problem solved!