DESeq2, difficulties with multi-factor design
1
2
Entering edit mode
anton.kratz ▴ 60
@antonkratz-8836
Last seen 7 months ago
Japan, Tokyo, The Systems Biology Insti…

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".

 

DESeq2 multiple factor design experimental design contrast • 2.6k views
ADD COMMENT
4
Entering edit mode
@mikelove
Last seen 18 hours ago
United States

You should combine location and treatment into a single factor (see example in the vignette), and use a design of ~ replicate + group.

For the all vs all comparison, you can use a numeric contrast which averages the effects from one location against the other. You can specify this with a numeric vector (corresponding to the order given by resultsNames) or using the list style of contrast with listValues set to 1/4 and -1/4 (because you are averaging four effects for each location).

ADD COMMENT

Login before adding your answer.

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