Hello, I am running a glm analysis with edgeR on 64 biologically independent samples, with 3 factors. I have sex (M and F), age (P0, P7, P15, P30), and genotype (Control, Knock-Out). I have two separate questions, 1) How does genotype effect males and females differently (at each timepoint) 2) Within each genotype (i.e. males only) what are the differences between genotypes over time. I began with a csv file that provides relevant information for each sample and followed the User guide's suggestion of pasting each factor together to form groups.
>Genotype<-Samples$genotype
>Stage<- Samples$stage
>Sex<-Samples$sex
>Group <- factor(paste(Genotype,Stage, Sex,sep="." ))
After this, I am not sure how to create my design matrix to ask the specific questions I am interested in?
This would be comparing the control males to the control females at P0 correct?
So for my first question, how does genotype effect males and females differently (at each timepoint) I would have to do the following contrasts between each KO and the corresponding control?
Please enclose any code between two sets of triple backticks see the format code part here.
The contrasts you have specified do as you suspect - they are called interaction terms - and detect those genes that are affected differently by KO status depending on sex.