Once again a "Model matrix not full rank"
2
0
Entering edit mode
arfranco ▴ 130
@arfranco-8341
Last seen 11 days ago
European Union

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?

DESeq2 design coldata • 284 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

The time and treatment are essentially the same thing, so you cannot have both in the model at the same time. Do the numbers 1:3 represent observations from the same subject (e.g., Control_1 is the same subject as Bazo_d4_r1)?

0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

In that case both time and treatment are identical things, so choose one and go with it.

ADD REPLY
0
Entering edit mode

But.. How to run a temporal assay?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode
swbarnes2 ★ 1.4k
@swbarnes2-14086
Last seen 14 hours ago
San Diego

Replicate numbers, like the 1 in control_1 are fine in sample names, but never add them to anything else in colData. From the computer's point of view, Control_1 is as different from Control_2 as it is from Treatment_1. So not only do you have a problem with your time being identical information as treatment, the computer thinks each sample has a unique treatment. That's not what you want.

ADD COMMENT

Login before adding your answer.

Traffic: 718 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6