Start with the design formula
In DESeq2, the design formula specifies which sample-level variables explain systematic differences in counts. A design such as ~ batch + condition asks the model to account for batch while estimating condition differences.
The formula must match the experimental structure. Pairing, repeated samples or confounded designs cannot be repaired by copying a generic formula from a tutorial.
Quality control before testing
Inspect library sizes, sample distances, principal components and metadata consistency before gene-level inference. Unexpected clusters can indicate batch effects, sample swaps, biological heterogeneity or technical problems that need investigation.
Filtering very low-count features can reduce the multiple-testing burden and remove genes with little information, but filtering rules should be transparent and appropriate for the workflow.
Contrasts define the comparison
A contrast tells DESeq2 which condition difference you want to estimate and in which direction. Check factor reference levels so that a positive log2 fold change means what you think it means.
For complex designs with interactions, the coefficient or contrast can represent a difference in differences rather than a simple group comparison, so interpretation must follow the model specification.
Effect size, uncertainty and multiplicity
DESeq2 reports log2 fold changes and statistical evidence across many genes. Adjusted p-values account for multiple testing, while shrinkage methods can stabilise noisy fold-change estimates for ranking and visualisation.
A low adjusted p-value does not guarantee biological importance. Consider effect magnitude, expression level, consistency, pathway context and independent validation where relevant.
