Comparing sets of differentially expressed genes
1
0
Entering edit mode
sunkid • 0
@sunkid-7053
Last seen 6.0 years ago
United States

We continue to run experiments like the ones I asked about a few months ago (DESeq design question). One of the latest comparisons is between two different compounds in the same cell line. We would like to find those genes that behave differently when comparing between the two. If I follow the suggested logic for figuring out the contrast to use, I get the following:

(cell1 compound 1 - cell 1 control) - (cell1 compound 2 - cell 1 control) ?= 0

<=> (cell1 compound1) - (cell1 compound2) ?=0

results(dds, contrast=list("cellc1.compoundc1","cellc1.compound2"))

However, this seems to give me genes that behave similarly as well, i.e. they are down (or up) in both treated sets of samples.

To elaborate more on what I mean, the two compounds are thought to essentially do the same thing albeit at different strengths of effect. How can I show this best and/or how can I find any genes that behave differently from the other genes. An extreme example for the latter would be that gene X is unregulated when treated with compound 1 but down regulated with compound 2.

deseq2 rnaseq statistics • 733 views
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

hi,

We've been recommending that users switch to DESeq(dds, betaPrior=FALSE) for designs which contain interaction terms (this will happen automatically in v1.10 which will be released in a week).

The reason is that it simplifies the interpretation of terms. Could you try this?

0
Entering edit mode

Adding the betaPrior=FALSE seems to give me a different result set where each compound is already compared to the control regardless of the order of the countData/colData. What black magic is this???

> expmat <- DESeqDataSetFromMatrix(countData=counts, colData=colData, design=~compound)
> dds <- DESeq(expmat)
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
> resultsNames(dds)
[1] "Intercept"    "compoundDMSO" "compound1"  "compound2"  "compound3"
> dds <- DESeq(expmat, betaPrior=FALSE)
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
> resultsNames(dds)
[1] "Intercept"             "compound_1_vs_DMSO"  "compound_2_vs_DMSO"  "compound_3_vs_DMSO"
> 

That said, I will still need to compare compound_1_vs_DMSO with compound_2_vs_DMSO now.

0
Entering edit mode

Note: I suggested that you use betaPrior=FALSE for designs which contain interaction terms. In this example you posted just now you do not have an interaction term. So I'm not sure what your aim is here. You can use contrast=c("compound","B","A") no matter if you use betaPrior=TRUE or FALSE.

In short: I recommend you use betaPrior=FALSE for designs with interactions, and speak with a local statistician on what contrasts to perform. Note that, when you use betaPrior=FALSE, the design matrix is the same as it would be with regular lm() in base R, or with edgeR or limma.

0
Entering edit mode

Thanks for the clarification, Michael. I am not sure where I misled you about the need to use interaction terms but I should have caught the conditional myself. Regardless, could you point me to the documentation that would explain how the betaPrior=FALSE leads to the control samples seemingly being identified automatically in my case?

Not having a local statistician available has brought me here. The contrast you suggests is basically the same as the one I had in my original question, I think. It completely leaves out the comparison with the control.

0
Entering edit mode

If you run your interaction design with betaPrior=FALSE, you will be able to contrast interaction terms in DESeq2 using the code like that line you had above.