Let X = (X 1 ,…, X N ) be the alignment data, with X i denoting the alignment for the i th gene (1#i#N; here N = 544), and let Z = (Z 1 ,…, Z N )be the set of selection histories, with Z i denoting the selection history for the i th gene (1#Z i #M; here M = 511). Recall that a selection history is defined as a pattern of presence or absence of positive selection on the branches of the unrooted phylogeny. Let Z ib M {0,1} indicate the selective mode (with 1 representing positive selection) for branch b M {1,…,B} (here B = 9) under history Z i . The parameters of the switching model, denoted h, are defined below. The model assumes independence of genes and independence of histories, and conditional independence of X and h given Z. Thus, the complete data likelihood is given by: