Compare two samples by Deseqs
1
0
Entering edit mode
hwu12 ▴ 10
@hwu12-12353
Last seen 5 weeks ago
United States

I am reading a section in the DEseq2 workflow about pairwise comparison in multiple groups Here. I was wondering how to code a simple comparison between two conditions in a multi-condition comparison. For example: if I have 3 replicates for 3 cell types (A,B,C) collected at 3 time points (0,1,3 hours) (total 27 RNA-seq datasets). How should we set the contrast to compare the replicates of A-0 hour to A-3 hours? Thanks!!!

DESeq2 RNASeq • 154 views
ADD COMMENT
3
Entering edit mode
@kevin
Last seen 2 hours ago
Republic of Ireland

HI,

You probably need to define a new factor that comprises a compound of Celltype and Timepoint, and then use this in your design formula.

~ Celltype_Timepoint

Then, your comparisons would look like:

A1_vs_A0 <- results(dds, contrast = c('Celltype_Timepoint', 'A1', 'A0'),
  independentFiltering = TRUE, alpha = 0.05, pAdjustMethod = 'BH', parallel = TRUE)
A1_vs_A0 <- lfcShrink(dds, contrast=c('Celltype_Timepoint', 'A1', 'A0'), res = A1_vs_A0)

A3_vs_A0 <- results(dds, contrast = c('Celltype_Timepoint', 'A3', 'A0'),
  independentFiltering = TRUE, alpha = 0.05, pAdjustMethod = 'BH', parallel = TRUE)
A3_vs_A0 <- lfcShrink(dds, contrast=c('Celltype_Timepoint', 'A3', 'A0'), res = A3_vs_A0)

B3_vs_A3 <- results(dds, contrast = c('Celltype_Timepoint', 'B3', 'A3'),
  independentFiltering = TRUE, alpha = 0.05, pAdjustMethod = 'BH', parallel = TRUE)
B3_vs_A3 <- lfcShrink(dds, contrast=c('Celltype_Timepoint', 'B3', 'A3'), res = B3_vs_A3)

There are likely ways to fit a more elaborate model, e.g. via an interaction term, but the way presented above is the easiest / most simple.

Kevin

ADD COMMENT

Login before adding your answer.

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