Differences in contrast results while using DESeq2 for one vs all rest combined conditions
1
1
Entering edit mode
@shreygandhi1990-15942
Last seen 3.8 years ago

I have 4 tissue types which I am trying to contrast between different groups using DeSeq2 in order to find genes unique to each tissue type(Let's say tissueA vs all others). I went through some posts: https://support.bioconductor.org/p/86347/ and https://www.biostars.org/p/317843/ and tried the numeric contrast option.

dds_test <- DESeq(dds_gene)
results(dds_test, contrast = c(1, -1/3, -1/3, -1/3))

As, I did not fully understand which number referred to what condition, and tried using the list form in contrast but the commands were throwing an error. I went through the post https://support.bioconductor.org/p/105087/ and tried to follow the same.

dds_test2<- DESeq(dds_gene, betaPrior=T)
resultsNames(dds_test2)

[1] "Intercept"             "tissueA"     "tissueB"  "tissueC"    "tissueD"

results(dds_test2, contrast = list(c("tissueA"),c("tissueB","tissueC","tissueD")), listValues=c(1, -1/3))

This resulted in completely different outputs. Then I tried to check the previous design resultnames using the resultsNames(dds_test) command which showed the following output:

  [1]  "Intercept"          "tissue_B_vs_A"           "tissue_C_vs_A"            "tissue_D_vs_A"

What is the difference between the two approaches? Which way is the correct way of doing this? Have I misinterpreted something?

deseq2 rna-seq differential expression analysis • 3.9k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 3 hours ago
United States

To compare one vs all the rest, you don’t want an intercept. Use ~0 + condition.

ADD COMMENT
0
Entering edit mode

Thanks for the reply. But I still do not understand what the above formulas do. Also, why is it important to remove the intercept in this case?

ADD REPLY
0
Entering edit mode

Take a look at the linear models chapter here:

http://genomicsclass.github.io/book/

In particular the part about contrasts, and also the difference between including an intercept or not in a linear model.

ADD REPLY

Login before adding your answer.

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