Alternatively you can simply encode it full-factorial as R, RC, S, SC, say we call this "group" and then use ~0+group, so you could test the interaction as Interaction = (S - SC) - (R - SC). The user guide has examples on interactions as said above.
Suppose you have four experimental conditions for your RNA-seq:
-Resistant species inoculated by a pathogen,
-Resistant species control,
-Susceptible species inoculated by a pathogen,
-Suceptible species control,
each with three replicates. Your RNA-seq samples look like the following:
R1, R2, R3, RC1, RC2, RC3, S1, S2, S3, SC1, SC2, SC3
And you use edgeR for the analysis. You can carry out easily pairwise comparisons such as:
my.contrasts <- makeContrasts(RvsRC, SvsSC, RvsS, RCvsSC, levels=design)
But, what I really want to test is the comparison (RvsRC)vs(SvsSC), a comparison of comparisons to see the actual effect of the pathogen. How can I proceed?
Thanks!
1 answer
If you want to find out the degree to which gene expression changes are different for pathogen exposure in resistant versus susceptible species, you can introduce an interaction term into the regression formula of edgeR.
~ species + exposure + species:exposure
Your question is similar to that of section 3.3.4 in the edgeR user manual.
Log in to answer this question.
Thank you both!!! :)
I have opted of following the 3.3.4 section of edgeR manual with the design:
Assuming Inoculated versus Control in Resistant species as baseline.
To see the different response between Resistant and Susceptible to the pathogen infection, I have set:
Do you think it makes sense?