DESeq2 - am I extracting results incorrectly?
1
0
Entering edit mode
bd2000 ▴ 30
@5d657c1d
Last seen 7 days ago
United Kingdom

Hi

Firstly apologies if this has been answered before, please feel free to leave a link below. I'm having issues extracting results as I believe it doesn't really add up (but this is potentially because I don't fully understand what the function is doing). Here is my code below

#my dataset 

   Group     Timepoint Participant_ID Participant.n
   <fct>     <fct>     <fct>          <fct>        
 1 Treatment Baseline  01             1            
 2 Treatment Followup  01             1            
 3 Treatment Baseline  02             2            
 4 Treatment Followup  02             2            
 5 Treatment Baseline  03             3            
 6 Treatment Followup  03             3            
 7 Treatment Baseline  04             4            
 8 Treatment Followup  04             4            
 9 Treatment Baseline  05             5            
10 Treatment Followup  05             5   
...

#if you want to replicate it
sampleinfo <- data.frame(
  Group = rep(rep(c("Treatment", "Control"), times = c(10, 9)), each = 2),
  Timepoint = rep(c("Baseline", "Followup"), times = 19),
  Participant_ID = rep(paste0(sprintf("%02d", 1:19)), each = 2)
)

sampleinfo <- sampleinfo %>%
  group_by(Group) %>%
  mutate(Participant.n = as.integer(factor(Participant_ID)))

simple.model<- as.formula(~ Participant.n + Timepoint) #for now 

ddsObj.raw <- DESeqDataSetFromTximport(txi = txi,
                                       colData = sampleinfo,
                                       design = simple.model)

model_matrix<-model.matrix(~ Group + Group:Participant.n + Group:Timepoint, sampleinfo)
correct_model_matrix <- model_matrix[, !colnames(model_matrix) %in% "GroupTreatment:Participant.n10"] #I have unbalanced groups 

design(ddsObj.raw) <- correct_model_matrix

ddsObj <- DESeq(ddsObj.raw)

Here is where things get confusing:

results<-results(ddsObj, name = "GroupControl.Followup")
sum(results$padj < 0.05, na.rm = TRUE)
#2689 genes 

results<-results(ddsObj, name = "GroupTreatment.Followup")
sum(results$padj < 0.05, na.rm = TRUE)
#352 genes 

#this is what I'm mainly interested in (if group X and group Y differ at followup taking into account individual differences)
results<-results(ddsObj, contrast = list("GroupControl.TimepointT3", "GroupLowsug.TimepointT3"))
sum(results$padj < 0.05, na.rm = TRUE)
#21 genes

Surely this doesn't add up right? How can there only be 21 DEG between the two groups at followup when they both have so many DEG individually? Am I extracting the results incorrectly?

DESeq2 • 250 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 5 days ago
United States

If I assume that Followup gets converted to T3 and Treatment to LowSug somewhere along the line (and therefore GroupTreatment.Followup is GroupLowSug.TimepointT3), then it's entirely possible that your results are OK.

Your last comparison is an interaction, which is notoriously underpowered, so you should expect fewer differentially expressed genes. In addition, the interaction is testing for genes that react differently over time in your two groups. If, as an example, you have a gene that goes up significantly in the controls at T3, and that gene also goes up in LowSug at T3, it should be significant in each individual comparison but likely not significant in the interaction.

Login before adding your answer.

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