I am trying to use DEseq2 to determine diff. expressed genes between various conditions, but find it very difficult how to specify what I want to compare.
My experimental design has three factor columns:
- two different locations
- four different conditions
- either two or three replicates - the replicates are matched
Here is what it looks like:
location | condition | replicate | |
---|---|---|---|
sample1 | nucleus | ctrl | a |
sample2 | nucleus | ctrl | b |
sample3 | nucleus | ctrl | c |
sample4 | nucleus | treatmentA | a |
sample5 | nucleus | treatmentA | b |
sample6 | nucleus | treatmentA | c |
sample7 | nucleus | treatmentB | a |
sample8 | nucleus | treatmentB | b |
sample9 | nucleus | treatmentB | c |
sample10 | nucleus | treatmentC | a |
sample11 | nucleus | treatmentC | b |
sample12 | cytoplasm | ctrl | a |
sample13 | cytoplasm | ctrl | b |
sample14 | cytoplasm | ctrl | c |
sample15 | cytoplasm | treatmentA | a |
sample16 | cytoplasm | treatmentA | b |
sample17 | cytoplasm | treatmentA | c |
sample18 | cytoplasm | treatmentB | a |
sample19 | cytoplasm | treatmentB | b |
sample20 | cytoplasm | treatmentB | c |
sample21 | cytoplasm | treatmentC | a |
sample22 | cytoplasm | treatmentC | b |
I want to know which genes are diff. expressed in various combinations, f.e.:
- nucleus & ctrl vs nucleus & treatmentA
- nucleus & ctrl vs nucleus & treatmentB
- nucleus & ctrl vs cytoplasm & treatmentA
- all nucleus vs all cytoplasm
What I tried:
mycountdata <- read.delim("table.csv", header = TRUE, sep = "\t") mycoldata <- read.delim("desc.csv", header = TRUE, sep = "\t") dds <- DESeqDataSetFromMatrix(countData = mycountdata, colData = mycoldata, design = ~ replicate + location + condition) dds <- DESeq(dds)
This is where I am stuck. I now want to use the results function, but I do not understand how to articulate, f.e., "compare ctrl vs treatmentA only in nucleus", "compare ctrl, nucleus vs ctrl, cytoplasm", "compare all nucleus vs all cytoplasm etc).
I think I understand what to do if I have only two factor-columns, but now that I have three I don't get how to specify that.
Any help would be greatly appreciated!
==
Versions used:
DESeq2_1.10.0
R version 3.2.2 (2015-08-14) -- "Fire Safety".