How to perform multiple pairwise comparisons
1
1
Entering edit mode
pkachroo ▴ 10
@pkachroo-11576
Last seen 4.1 years ago

Hi, 

I have 10 strains with three replicates grown under the same condition. I would like to perform  pairwise comparisons between the 10 strains without repeating. Within Deseq2, setting up all possible individual contrasts takes up a lot of time.  I was wondering if there is a faster way to perform this operation and save the result files. 

Regards,

Priyanka Kachroo

deseq2 bioconductor rnaseq • 5.5k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 4 hours ago
United States

Only run DESeq() once, then use results(dds, contrast=c("condition","B","A")) to compare two groups.

For performing all pairs of the 10 groups (45 pairs), you really need take into consideration that you are doing multiple testing in terms of contrasts as well as genes. The limma User's Guide has some recommendations for options there are (see section 13.3 Multiple Testing Across Contrasts). I would recommend you do a "global" correction, as described there. 

We don't have functions to do this in DESeq2, because it's rare that someone wants to perform so many contrasts. What you should do to perform a global correction is to make a vector of all the p-values from all the contrasts, then use p.adjust(..., method="BH") to adjust them, then you can reassign to the different tables. If this is confusing, you might want to talk to a bioinformatician or data analyst who can help you to perform these corrections.

 

ADD COMMENT
0
Entering edit mode

Hi Michael,

Thank you for the recommendation above!

I read through Limma's user guide. It is stated that method="global" is recommended when a set of closely related contrasts are being tested. It appends all the tests together into one long vector of tests, i.e., it treats all the tests as equivalent regardless of which contrast they relate to. I have one question if that's ok. I have 10 age groups and I want to do pairwise comparisons (so in total 45 comparisons), assuming I named my age groups as Ages A - I. It should be as

AB <- results(dds, contrast=c("AGE", "B", "A"), independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)
AC <- results(dds, contrast=c("AGE", "C", "A"), independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)

etc.

So, here I am performing every contrast separately, running it one by one .. In this case, why would I use method="global"? Shouldn't I use method="separate" since I am running these comparisons separately and retrieving the adj-p values separately?

Thanks

ADD REPLY
0
Entering edit mode

We only provide the adjustment per comparison in DESeq2.

ADD REPLY
0
Entering edit mode

Thank you, Michael for your quick reply! Sorry but I am still confused. Are you saying that I can use the method="separate" since we are doing every contrast separately?

ADD REPLY
0
Entering edit mode

Hi Michael, just wanted to follow up on my previous question if that's ok :) ... Are you confirming that method='separate" can be used since I am running every contrast separately?

ADD REPLY
0
Entering edit mode

Yes that is how we approach multiple testing

ADD REPLY

Login before adding your answer.

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