Methods. (A) Phylogenetic tree of H3 reconstructed based on nucleotide data, for this tree sequences were partitioned into two communities for illustration purpose (red, green). Our method allows for different migration rate matrices (Q1, Q2) to be calculated for different month of the year e.g. Jan-Jun (gray background), and Jul-Dec (white background). (B) Inference pipeline: 1. Date annotated sequences are sampled from a global pool, and are partitioned based on their collection location. 2. Multiple possible phylogenetic trees are reconstructed based on nucleotide data. This can be done for several protein segments. 3. Likelihood is calculated for: a given migration model, known tip location, and a single tree topology. 4. An MCMC is used to sample from migration model parameters and trees based on their likelihood. 5. Counts and the timing of stochastically mapped migration events along the tree branches and its trunk are sampled. (C) In order to calculate a single tree and model parameters likelihood, transition probabilities are generated based on the matrix exponent of the rate matrices. Transition probabilities are multiplied across the phylogenetic tree, and integrated over internal unknown nodes. For transitions spanning across seasonal borders the transition matrices are accordingly multiplied. An additional step, called stochastic mapping, is used to sample from the timing of migration events along the branches of tree, in addition to the nodes.