Using a numeric contrast vector to find genes differentially expressed by non-additive effect of a condition
1
0
Entering edit mode
TJ • 0
@5e636cac
Last seen 3.0 years ago
Jinju

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)

Then,

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?

DESeq2 • 680 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 4 hours ago
United States

A recommendation: you may want to partner up with someone at your institute familiar with linear models in R (or SAS). Converting from hypotheses to contrasts is something that takes some time to learn. I can't provide this kind of statistical consultation on the support site, but restrict myself to software questions.

Supplying a numeric to contrast is a way to combine the coefficients in resultsNames(dds). It is up to you to translate your hypothesis into coefficients or combinations of coefficients.

ADD COMMENT

Login before adding your answer.

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