Hi again,
I have an RNA-seq experiment with samples of different genotypes and 3 different developmental stages. For each sample I determined a "genostage" factor
genotype <- rep(c("WT","Geno1","Geno2",<other genotypes>), each = 12)
dev <- rep(c("stage1","stage2", <other stages>), each = 4)
genostage <- factor(paste(genotype, dev, sep = "_"))
design <- model.matrix(~0+genostage)
Now, I would like to define the contrast to determine changes in expression over time (developmental stage) between two genotypes. According to examples in the limma manual, I would define the contrast like that:
(genostageG1_stage2-genostageG1_stage1)-(genostageG2_stage2-genostageG2_stage1)
But then, I was wondering how I would interpret the results of the following contrast, and whether it makes sense at all?
(genostageG1_stage2-genostageG2_stage2)-(genostageG1_stage1-genostageG2_stage1)
Could you please shortly explain me the difference between these two contrast statements?
Thank you very much.
I don't know how you managed to flip the numbers around, as the contrasts are mathematically identical.
Anyway, I'll consider your first case. The "1" genes are those where the log-fold change between stages for G1 is greater than the log-fold change between stages for G2. The "-1" genes are those where the log-fold change between stages for G1 is less than the log-fold change between stages for G2. This does not make any statement about whether the gene is DE or not between stages for either G1 or G2. For all limma knows, a "1" gene might be significant because it is upregulated in G1 and not DE in G2; or it is not DE in G1 and downregulated in G2; or it is upregulated in both G1 and G2, but to a greater extent in G1. As Jenny said, you have to look at the individual log-fold changes between stages for G1 and G2 to interpret this in a meaningful way.
The second case is similar. The "1" genes are those where the log-fold change between G1/G2 in stage 1 is greater than the log-fold change between G1/G2 in stage 2. The "-1" genes are... well, you get the drift.
For an interaction term: (A - B) - (C - D) == A - B - C + D == (A - C) - (B - D)
It took me years to really understand what the direction of change means, and in the end I ignore direction of change because it doesn't tell you anything about either individual fold change's position relative to 0 (no change). See slides 18 and 19 from this presentation: https://wiki.illinois.edu/wiki/download/attachments/604996053/VennDiagrams_11nov16.pptx?version=1&modificationDate=1478815014000&api=v2