My experiment is an easy one.
- I have 3 replicates as control. No treatment done.
Then, I did a treatment and collected three replicates at different days time:
- 3 replicates after 4 days
- another 3 replicates after 7 days
- and another 3 replicates after 14 days
These are my samples
> samples
Experiment Run
1 Control_1 B_C1
2 Control_2 B_C2
3 Control_3 B_C3
4 Bazo_d4_r1 B4_r1
5 Bazo_d4_r2 B4_r2
6 Bazo_d4_r3 B4_r3
7 Bazo_d7_r1 B7_r1
8 Bazo-d7_r2 B7_r2
9 Bazo-d7_r3 B7_r3
10 Bazo_d14_r1 B14_r1
11 Bazo_d14_r2 B14_r2
12 Bazo_d14_r3 B14_r3
Experiment is the name of the experiment.
And Run the name of the folder containing the abundance.h5 files obtained after mapping with Kallisto
Then I generate the txi `list after importing the data with the tximport function.
And this is the moment to create the coldata matrix
> coldata
Time Treat
1 d0 Control_1
2 d0 Control_2
3 d0 Control_3
4 d4 Bazo_d4_r1
5 d4 Bazo_d4_r2
6 d4 Bazo_d4_r3
7 d7 Bazo_d7_r1
8 d7 Bazo-d7_r2
9 d7 Bazo-d7_r3
10 d14 Bazo_d14_r1
11 d14 Bazo_d14_r2
12 d14 Bazo_d14_r3
and with this coldata I run
ddsTxi <- DESeqDataSetFromTximport(txi, colData=coldata, design = ~ Time + Treat + Time:Treat)
and ended with the infamous error.
I don't foresee in my coldata confounding contrasts, but I run out of alternatives after creating various different coldata data frames in trying to fullfill the full rank
To valorate different coldata alternatives, I am using limma
design <- model.matrix(~Time + Treat + Time:Treat)
is.fullrank(design)
obtaining in all the cases a FALSE result
¿Any hint?
numbers 1 to 3 represent observations and/or replicates
Control is control. The three controls are shown as Control_1, control_2 and Control_3
Bazo_d4_r1 means tissue treated after 4 days and replicate 1 out of 3
Another example:
Bazo_d14_r3, means tissue treated after 14 days, and replicate 3 out of 3
As they are replicates, and we had to sacrify the animals for each of the replicates, the only thing in common are the days and the treatment done. We required 12 different animals
In that case both time and treatment are identical things, so choose one and go with it.
But.. How to run a temporal assay?
You already ran a temporal assay. Now you can compare each time point to the baseline.
The interaction term is only applicable if you have untreated samples at each time point, which you do not have. In that scenario (better experimental design IMO), you can compare treated and untreated at each time point to remove any effects due to reaching confluence and having the cells become senescent.