BackgroundImmune responses need to be initiated rapidly, and maintained as needed, to prevent establishment and growth of infections. At the same time, resources need to be balanced with other physiological processes. On the level of transcription, studies have shown that this balancing act is reflected in tight control of the initiation kinetics and shutdown dynamics of specific immune genes. ResultsTo investigate expression dynamics and trade-offs after infection genome-wide and with high temporal resolution, we performed an RNA-seq time course on D. melanogaster with 20 time points post-LPS injection. A combination of methods, including spline fitting, cluster analysis, and Granger Causality inference, allowed detailed dissection of expression profiles, lead-lag interactions, and functional annotation of genes through guilt-by-association. We identified genes encoding antimicrobial peptides and co-expressed, less well characterized genes, as immediate-early response genes with a sustained up-regulation up to five days after stimulation. In contrast, stress response genes and additional immune genes, among which were Bomanins, demonstrated early and transient responses. We further observed a strong trade-off with metabolic genes, which strikingly recovered to pre-infection levels before the immune response was fully resolved. ConclusionsThis high-dimensional dataset enabled the comprehensive study of immune response dynamics through the parallel application of multiple temporal data analysis methods. Multivariate Granger causality analysis proved to be a valuable addition to classical time course analysis methods such as clustering, due to its ability to define directed networks of lead-lag patterns.