This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DESEQ2 Design formula testing cell type across condition

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

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.

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.

0 answers

No answers yet.

Log in to answer this question.