The contemporary genomic diversity of viruses is a result of the continuous and dynamic interaction of past ecological and evolutionary processes. Thus, genome sequences of viruses can be a valuable source of information about these processes. In this review, we first describe the relevant processes shaping viral genomic variation, with a focus on the role of host–virus coevolution and its potential to give rise to eco-evolutionary feedback loops.
We further give a brief overview of available methodology designed to extract information about these processes from genomic data. Short generation times and small genomes make viruses ideal model systems to study the joint effect of complex coevolutionary and eco-evolutionary interactions on genetic evolution. This complexity, together with the diverse array of lifetime and reproductive strategies in viruses ask for extensions of existing inference methods, for example by integrating multiple information sources. Such integration can broaden the applicability of genetic inference methods and thus further improve our understanding of the role viruses play in biological communities.