View Single Post
Old 07-01-2015, 08:09 AM   #4
Michael Love
Senior Member
Location: Boston

Join Date: Jul 2013
Posts: 333

Your code looks correct.

One comment: the outlier detection is useful when there are a few genes with outliers. Here there are many genes being flagged, which either means: there is a lot of variability, which the outlier detection method is not picking up on or there is a sample with consistent outlier counts. So I'd recommend setting minReplicatesForReplace=Inf to turn off filtering, and to use plotPCA on rlog or VST data to identify if there is an obvious outlier sample which should be removed.

Question 1: you don't need to focus on the log2FoldChange. When you perform a likelihood ratio test, you are testing multiple terms. Here you are testing whether there are treatment specific differences over time. There are multiple terms involved in this test: the additional effect of treatmentA at time 1, the additional effect of treatmentA at time 2 (compared to the base level in controls). The p-values and adjusted p-values are the important columns. This is described in the help page for results, under "On p-values":


Question 2: the meaning of each of the terms in an interaction model is quite complex, and I often recommend that users who have complex experimental designs who are not familiar with analyzing these speak to a local statistician who can help explain all the terms. There is nothing special about DESeq2 here, these are the same terms that would appear in a linear regression time course analysis, so any person with statistical training should be able to explain these to you in person.

Question 3: this is a ggplot2 error, so I'm not sure. it's likely related to 0's in the count column and the log10 scaling.

Your last question: you are testing for treatment-specific differences across multiple time points, so it doesn't make sense to do LFC thresholding here. Or if you want to threshold, remember that there are multiple time points being tested, and each one has it's own interaction term.
Michael Love is offline   Reply With Quote