Inference of horizontal gene transfer between phages. Phage genome tree is inferred from gene content data (left side of the top panel) and sequence family trees are inferred from the aligned sequences, separately for each POG (right side of the top panel). The T-REX algorithm is used to infer HGT events by choosing such rearrangements of the gene content tree that reattach the subtrees in a way that minimizes the Robinson and Foulds topological distance to the appropriate sequence family tree. On the top right, a fragment of sequence alignment for one class of cII transcription regulators (POG226) is shown. The sequence family tree built on the basis of complete alignment is shown at the bottom right corner, and the sub-tree of the gene-content tree that contain the same set of phages as thesequence family tree is shown at the bottom left corner. Two pairs of phages, namely, 933W and Stx2I, as well as HK620 and P22, are in discordant positions in the gene content and protein family trees (indicated by the blue edges in both trees). To reconcile gene content and protein family trees, T-REX suggests a transfer from 933W to Stx2I and from HK620 to P22 (blue arrows).