Multifactor Design in RNA-seq data
Let us consider a 2 factor RNA-seq dataset; first factor being treatment with 2 levels: saline/morphine and the 2nd factor being sex with 2 levels: male/female. There are 4 possible scenarios -
| Experimental condition | treatment | sex |
|---|---|---|
| 0, 0 | saline | male |
| 1, 0 | morphine | male |
| 0, 1 | saline | female |
| 1, 1 | morphine | female |
The above information can also be represented as a design matrix as follows:
| x0 | x1 | x2 |
|---|---|---|
| 1 | 0 | 0 |
| 1 | 1 | 0 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Here, x0 is always 1. x1 represents the first design factor treatment and x2 represent 2nd design factor sex. The rows represent each experimental condition. We formulate the equation for each gene in the experiment as follows -
y = β0 + x1β1 + x2β2 + x1x2β12 ...... (Eq. 1)
Here, y represents the expression of a gene upon treatment. β0 aka intercept, represents the expression of the gene in baseline (male saline) condition. If we only consider the treatment morphine, x2 becomes 0. Therefore, the 3rd and 4th terms in Eq. 1 become 0 -
y = β0 + x1β1
x1 here is 1. Assuming the expression of genes are on log scale, the above is rewritten as -
β1 = y - β0
= log2(expression morphine) - log2 (expression saline)
= log2 (expression morphine / expression saline)
This gives us the log2FoldChange of the gene in mophine vs. saline. Similarly, β2 is the log2FoldChange of the gene in female vs. male.
Interaction term -
How about when the cells are treated with morphine and are female? In this case, both x1 and x2 is equal to 1. Eq. 1 can be rewritten as -
β12 = y - (β0 + β1 + β2)
β12 here represents the interaction term, which is the difference b/w the observed expression y, and the expression expected from the individual treatments obtained by adding the effects of female alone and effect of morphine alone to the baseline (male, saline) expression . This term represents the effect of both female sex and morphine on cells, and indicates that the effects of female and morphine do not simply add up. Rather, they combine in a more complex manner.
For instance, if the target of the morphine and female sex were on the same pathways in a cell, it will give rise to the same effect on the cells, making y and β both 0. Biologically, β1 will be equal to β2. Their combination will also not have further effect. Therefore,
β12 = -β1
If on the other hand, the target of the morphine and female are on different pathways that can go hand in hand, we may see that if β1 and β2 are small, the combined effect becomes large.
Source - https://www.huber.embl.de/msmb/Chap-CountData.html#rnaseq:sec:multifactor