Hi everyone,
Sorry for the inconvenience, I was hoping that Michael Love in particular could help me. On the same dds DESeq2 object, I performed a DGEAnalysis with DESeq2, through 2 approachs :
- One all-steps-in-one
dds <- DESeq(dds)
- and one step-by-step dissected
(even if longer, I prefer a step-by-step approach in my pipeline context mainly as you can see because I can easily extract the normalized table without redoing that computing).dds <- estimateSizeFactors(dds) # normcnt <- counts(dds, normalized=TRUE) # write.csv(normcnt, file = "normcnt.csv", row.names = TRUE) dds <- estimateDispersions(dds) dds <- nbinomWaldTest(dds)
But I do not obtain exactly the same result analysis. With step-by-step, Log2FoldChanges seem to be the same, but padj and others are not, for each gene, exactly the same, and I have very slightly less DE genes.
Is my step-by-step not strictly equivalent to DESeq() ? If so, do you see what to modify ?
And (if you have the time) another question, what is officially the default DESeq2 normalization method name, Means of Ratio Method, Size Factors Method ? And if others available in DESeq2 (I understand that), is there a list (I didn't find), with formulas, and how to set it in parameter ? For example :
dds <- estimateSizeFactors(dds, normalizationMethod="TMM")# ?
Thank you for your time and your help.
Thank you very much for your quick cross-check help.
I have redone, and sadly unchanged.
So it is
The only difference I can see is in the adjusted p-values, and those will only change (given the same input p-values) if the number of tests vary.
DESeq() also does refitting of outliers. Try
minRep=Inf
to turn that off.Wonderful ! It works. So :
I suppose that if you configured by default DESeq() with that minRep as not Inf, it is a good thing and must be kept, so, to keep this default setting, as you said elsewhere, "[DESeq()] uses the pre-existing sizeFactors(dds) however they were created (or simply assigned).", I can simply do
?
Is it possible to set that minRep= not Inf manually as a step (function or parameter), in this context :
(not found in documented parameters of these functions) ?
Thank you very much for your help, I m a student so sorry if too evident question, I will avoid to bother you more.
Have a good day.
The thing it is doing is not part of the sub functions.
I don't love the outlier replacement but we leave it there for consistency. I often turn it off myself for large datasets and use manual inspection.