DESeq2 effects of treatment at different time points including subject ID
1
0
Entering edit mode
@catalina-aguilar-hurtado-6554
Last seen 4.1 years ago
United States

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

deseq2 rnaseq differential gene expression • 3.3k views
1
Entering edit mode
@mikelove
Last seen 2 days ago
United States

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode
Looks good. My above recommendation is all you need then.
ADD REPLY

Login before adding your answer.

Traffic: 833 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