Hi all,
I have the following type of data:
- 5 batches (5 different data sets)
- 2 conditions (wt, mutant)
- 3 different tissues (data 1 and 2 represent tissue 1, data 3 and 4 represent tissue 2, data 5 represents tissue 3)
I would like to find DEGs in tissue 1 - mutant vs. other tissues (wt and mutant together), but I'm not sure how to specify the parameter for a tissue.
Here is what I would do for only batch and condition for the comparison mutant vs wt:
# preparing coldata
coldata=matrix(,22,3)
coldata[,1]=colnames(countdata)
colnames(coldata)=c("probe","condition","batch")
coldata[1:4,3]=paste("data1")
coldata[5:8,3]=paste("data2")
coldata[9:12,3]=paste("data3")
coldata[13:17,3]=paste("data4")
coldata[18:22,3]=paste("data4")
coldata[c(1:2, 5:6,9:10,13:15,18:20),2]=paste("mutant")
coldata[c(3:4,7:8,11:12,16:17,21:22),2]=paste("wt")
# running DESeq2
dds <- DESeqDataSetFromMatrix(countData = countdata, colData = coldata, design= ~ batch + condition)
dds <- DESeq(dds)
resultsNames(dds) # lists the coefficients
res <- results(dds, name="condition_mutant_vs_wt")
Now I wonder how to include the tissue information and compare tissue 1 - mutant vs. other tissues (wt and mutant together).
Yes, we are aware of large differences between the tissues, but we would still like to do it. I will use then such a
design = ~ batch + tissue + condition
, thanks a lot for your reply!For everyone having a similar problem to mine, you can also find these two posts interesting, which together with the answer above clarify a lot: DESEq2 comparison with mulitple cell types under 2 conditions and DESeq2: one condition vs multiple combined