# DESeq2. Which is better: using the altHypothesis argument in the results function or manually filtering for your desired P-value and Log2FoldChange?

In DESeq2 you can identify your differentially expressed (DE) genes using the results function. I noticed people in my lab using the results() function with the minimum number of arguments supplied (below) and then converting the resulting object to a data frame filtering for the genes they considered DE (where they considered a fold change of +/- 2 and a p-value of 0.05 to be DE).

res1 <- results(dds, contrast(condition, treated, untreated))


Alternatively, I noticed that the results function allows you to set both the P-value and minimum fold change when you use the 'altHypothesis' argument (below). The resulting list from using this method is considerably shorter than the list from manually filtering for the same P-value and fold change. I am aware that that by using the 'altHypothesis' argument it comparisons are made using a Wald test rather than a LRT test, however, I am completely unfamiliar with these two tests and I was not able to understand their significant differences in the context of RNA-seq analysis.

res1 <- results(dds, contrast(condition, treated, untreated), alpha = 0.1, lfcThreshold = 1, altHypothesis = "greaterAbs")


Due to the difference in size of the lists, and the goal of being consistent moving forward for the lab, does anyone have any insight as too which one is better? Neither myself or my lab are particularly used to this analysis but we would like to try to follow best practices as much as possible.

Thank you

It is also possible to provide thresholds for constructing Wald tests of significance. Two arguments to the results function allow for threshold-based Wald tests: lfcThreshold, which takes a numeric of a non-negative threshold value, and altHypothesis, which specifies the kind of test. Note that the alternative hypothesis is specified by the user, i.e. those genes which the user is interested in finding, and the test provides $$p$$ values for the null hypothesis, the complement of the set defined by the alternative. The altHypothesis argument can take one of the following four values, where $$β$$ is the log2 fold change specified by the name argument, and $$x$$ is the lfcThreshold.
• greaterAbs - $$|β|>x$$ - tests are two-tailed
• lessAbs - $$|β| - p values are the maximum of the upper and lower tests
• greater - $$β>x$$
• less - $$β<−x$$