Search
Question: DESeq2 effects of treatment at different time points including subject ID
0
gravatar for Catalina Aguilar Hurtado
2.0 years ago by
Australia

Hi all, 

I am doing differential gene expression of 5 different subjects, 2 treatments, 2 time points. I want to combine the response   of the treatment at both time points, but controlling the subject effect. I am not interested  in the effects across the subjects or to each time point. 

Not sure how to do it, 

Now I have:

dds <- DESeqDataSetFromMatrix(
  countData = countdata,
  colData = coldata,
 design = ~Time + Treatment)
dds

dds$Treatment <- factor(dds$Treatment, levels=c("35", "25"))

dds$Treatment <- relevel (dds$Treatment, "35")

dds$Time <- factor(dds$Time)

dds <- DESeq(dds)

But I think this is not taking into account my subject ID? I looked at the contrast option but I understand this is for looking at differences within the factors. 

DESeq2_1.4.5 

Thanks,

Catalina

ADD COMMENTlink modified 2.0 years ago • written 2.0 years ago by Catalina Aguilar Hurtado50
1
gravatar for Michael Love
2.0 years ago by
Michael Love12k
United States
Michael Love12k wrote:

hi Catalina, 

Just a note, you're 2 version behind the release (1.8) and we recommend keeping up to date if possible (it is not always possible in the middle of a project which relies on other package versions).

I would need to see the column data to see if it is possible to control for subject across treatment:

as.data.frame(colData(dds))

If subject effects are not confounded with treatment you could use: ~ subject + time + treatment

Another small note: giving the level order to factor() means that you don't have to use relevel() because you've already specified the reference level.

ADD COMMENTlink written 2.0 years ago by Michael Love12k

Hi Michael,

Not sure what you mean if the subject is not confounded with treatment. I have 5 subjects, with only have one sample per subject (one subject was sequenced twice at each treatment and time (e.g. A1 and A1.1)).

Fro the factor levels means that the factor I write first is the base level? 35 in my example

Thanks

> as.data.frame(colData(dds))
     Subject Treatment Time
A1         1        35    1
A1.1       1        35    1
A2         2        35    1
A3         3        35    1
A4         4        35    1
A5         5        35    1
B1         1        25    1
B1.1       1        25    1
B2         2        25    1
B3         3        25    1
B4         4        25    1
B5         5        25    1
C1         1        35   24
C1.1       1        35   24
C2         2        35   24
C3         3        35   24
C4         4        35   24
C5         5        35   24
D2         2        25   24
D2.1       2        25   24
D4         4        25   24
D5         5        25   24

ADD REPLYlink written 2.0 years ago by Catalina Aguilar Hurtado50
Looks good. My above recommendation is all you need then.
ADD REPLYlink written 2.0 years ago by Michael Love12k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 163 users visited in the last hour