Deseq2 more than two condition
1
2
Entering edit mode
4.1 years ago
Nelislam4 ▴ 20

Hi, I am stuck in differential gene expression analysis (more than two condition) with Deseq2, here is the colData table:

Sample.Type env condition
WT  cold    cold.3
WT  cold    cold.3
WT  cold    cold.6
WT  cold    cold.6
WT  cont    cont.3
WT  cont    cont.3
WT  cont    cont.6
WT  cont    cont.6
WT  salt    salt.3
WT  salt    salt.3
WT  salt    salt.6
WT  salt    salt.6
mutant  cold    cold.3
mutant  cold    cold.3
mutant  cold    cold.6
mutant  cold    cold.6
mutant  cont    cont.3
mutant  cont    cont.3
mutant  cont    cont.6
mutant  cont    cont.6
mutant  salt    salt.3
mutant  salt    salt.3
mutant  salt    salt.6
mutant  salt    salt.6

Please note that every sample.type has three conditions in env column (salt, cold, and control) and every one of them also has two conditions, for example salt has (salt.3 and salt.6), as I need to get the differential expressed genes in salt environment (between WT and mutant), so I had changed colData table to be able to manipulate the contrast of Deseq2:

Sample.Type env condition
WT  cold    cold.3
WT  cold    cold.3
WT  cold    cold.6
WT  cold    cold.6
WT  cont    cont.3
WT  cont    cont.3
WT  cont    cont.6
WT  cont    cont.6
WT  WT.salt salt.3
WT  WT.salt salt.3
WT  WT.salt salt.6
WT  WT.salt salt.6
mutant  cold    cold.3
mutant  cold    cold.3
mutant  cold    cold.6
mutant  cold    cold.6
mutant  cont    cont.3
mutant  cont    cont.3
mutant  cont    cont.6
mutant  cont    cont.6
mutant  mutant.salt salt.3
mutant  mutant.salt salt.3
mutant  mutant.salt salt.6
mutant  mutant.salt salt.6

dds = DESeqDataSetFromMatrix( countData = countData , colData = colData , design = ~Sample.Type + env)
dds.run = DESeq(dds)
res=results(dds.run)
res=results(dds.run, contrast = c("env", "mutant.salt", "WT.salt"))

Q1: Is that the right analysis to get DEGs in salt environment (between WT and mutant)? If not, How?

Q2: what is the right way to get DEGs in salt environment but in this case between salt.3 and salt.6 in WT only?

I really appreciate your help!

Thanks in advance

RNA-Seq • 999 views
ADD COMMENT
1
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
code_formatting

Thank you!

ADD REPLY
0
Entering edit mode
4.1 years ago

For clarity and for being able to use this script to answer different questions in the future, I'd make 7 columns of sample data. One that is WT or mutant only, one that is env only, one that is condition only, three more that combine two of those elements, and one that combines all three.

For your first question, I'd of a design of ~ Sample_env + condition, and for the second I'd use ~ Sample_env_condition.

There are other ways to do which which would involve interactions, but this way is far more readable.

ADD COMMENT
0
Entering edit mode

Many Thanks for your response and support. Regarding to your first answer, I think that I didn't need condition column to be add in design, I just need salt environment without hours which is represented by salt.3. However, I have another question as well, Should I change the names of cold variables in env column to WT.cold and mutant.cold like I did with salt, but in this case I think Deseq2 will take in consideration the difference between them (WT.cold and mutant.cold) but I just need the difference between salt env. Is that Right!?

Thanks a lot

ADD REPLY

Login before adding your answer.

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