Hello. I have been struggling on finding a non-additive effect of combined two drugs. So, I have a dataframe defining treatment of my samples as follows:
# Define experimental conditions for each sample condition <- factor(c(rep("A",3),rep("B",3),rep("C",3),rep("D",3),rep("E",3))) batch <- factor(rep(1:3,5)) coldata <- data.frame(row.names=colnames(countdata),condition,batch) > coldata condition batch A1 A 1 A2 A 2 A3 A 3 B1 B 1 B2 B 2 B3 B 3 C1 C 1 C2 C 2 C3 C 3 D1 D 1 D2 D 2 D3 D 3
in which condition A is my vehicle control; B is a single treatment of one drug; C is a single treatment of another drug; and D is a combined treatment of the two drugs (B and C). Also, there is a batch effect as those triplicates are treated and prepared on day 1, 2, and 3, which were batch effects that needs to be removed in my analysis. So, in order to do this in DESeq2, I have
dds <- DESeqDataSetFromMatrix(countData=countdata,colData=coldata,design=~batch+condition)
dds <- DESeq(dds) # run DESeq2 rld <- rlog(dds,blind=FALSE) removeBatchmat <- assay(rld) removeBatchmat <- limma::removeBatchEffect(removeBatchmat,rld$batch) # remove the batch effect assay(rld) <- removeBatchmat plotPCA(rld) # Quality control
Now, I have been using "a character vector with exactly three elements: the name of a factor in the design formula, the name of the numerator level for the fold change, and the name of the denominator level for the fold change (simplest case)" described in
contrast argument in
?results in order to identify an additive drug effect of treatment "B" compared to vehicle control "A", as an example, so I have been always using
results(dds, B, A).
However, I realized that I have to utilize a numeric contrast vector to find a non-additive effect of combined drugs, which is "D" in the example above.
So far, I have found that I need to use a function
makeContrast and define my contrast as
(combo - control) - ((drugB - control) + (drugC - control)) or
(D - A) - ((B - A) + (C - A)), which is algebraically equal to
(D + A) - (B+ C). However, I have no idea how I can use a numeric contrast vector into
makeContrast function to make an appropriate
contrast and how I can use this contrast object into
results for differential gene expression analysis considering the batch effect to be removed.
My apologies that my question has too many things to be talked about, but I have been struggling on doing this for months. Can anyone help me out please?