DESEQ2 Design formula testing cell type across condition
0
0
Entering edit mode
3.7 years ago
Barry Digby ★ 1.1k

Hi,

I am attempting to compare the following samples in DESEQ2 that follow and experimental design of:

condition    celltype
Ctrl          A
Ctrl          B
Ctrl          C
Ctrl          D
CYTO          A
CYTO          B
CYTO          C
CYTO          D

(Replicates left out for simplicity sake)

The researcher has requested I compare cell types to each other (A vs. B, A vs. C, A vs. D, B vs. C etc). I know how to compare Cell type A vs Cell type B for Control and CYTO, separately. I did this by merging condition and celltype into a new column called group, and called

 results(dds, contrast=c("group", "ACtrl", "BCtrl"))

However I would like to compare A vs. B across condition. Reading online, I have found this might be what I need to test genes which respond differently to cell type across condition:

design = ~ condition + celltype + condition:celltype

>resultsNames:  # "C" is the reference
[1] "Intercept"                     "condition_CYTO_vs_Ctrl"        "celltype_A_vs_C"          
[4] "celltype_B_vs_C"        "celltype_D_vs_C"        "conditionCYTO.celltypeA"   
[7] "conditionCYTO.celltypeB" "conditionCYTO.celltypeD"

Assuming this is correct, my confusion lies in calling the correct comparison in results. Do i need to use "name", "contrast", "list", "contrast=list" ?

Thank you in advance

deseq2 design RNA-Seq • 1.6k views
ADD COMMENT
1
Entering edit mode

In the first scenario where you created a new column, you could use contrast but in the 2nd scenario you have to use name from resultsNames. To compare A vs B, I would suggest revel to make A reference.

ADD REPLY
0
Entering edit mode

Yeah I think I had gone too far,

design = ~ condition + celltype + condition:celltype

Is not what I was after. Leaving out condition:celltype allowed me to control for the effects of condition. My phrasing was unclear -- instead of 'across condition', I should have said controlling for condition. Very sloppy post, my bad.

ADD REPLY

Login before adding your answer.

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