Evolution through segmental duplications and losses: a Super-Reconciliation approach

The classical gene and species tree reconciliation, used to infer the history of gene gain and loss explaining the evolution of gene families, assumes an independent evolution for each family. While this assumption is reasonable for genes that are far apart in the genome, it is not appropriate for genes grouped into syntenic blocks, which are more plausibly the result of a concerted evolution. Here, we introduce the Super-Reconciliation problem which consists in inferring a history of segmental duplication and loss events (involving a set of neighboring genes) leading to a set of present-day syntenies from a single ancestral one. In other words, we extend the traditional Duplication-Loss reconciliation problem of a single gene tree, to a set of trees, accounting for segmental duplications and losses. Existency of a Super-Reconciliation depends on individual gene tree consistency. In addition, ignoring rearrangements implies that existency also depends on gene order consistency. We first show that the problem of reconstructing a most parsimonious Super-Reconciliation, if any, is NP-hard and give an exact exponential-time algorithm to solve it. Alternatively, we show that accounting for rearrangements in the evolutionary model, but still only minimizing segmental duplication and loss events, leads to an exact polynomial-time algorithm. We finally assess time efficiency of the former exponential time algorithm for the Duplication-Loss model on simulated datasets, and give a proof of concept on the opioid receptor genes.


Background
Gene gain and loss is known as a major force driving evolution. The classical method used for inferring these events is to reconstruct the tree of the gene family of interest and to embed it into the species phylogeny. Assuming the gene and species trees are known and correspond to the true evolution, incongruence between the two trees can be explained by gain and loss events, and "reconciling" the two trees allows recovering these events.
Tree reconciliation can be performed through different biological models of evolution, the most common being the Duplication-Loss (DL) [1][2][3] or Duplication-Loss and Transfer [4][5][6] models. Incomplete lineage sorting, i.e. imperfect segregation of alleles, can also be considered [7,8]. While most reconciliation methods are based on the parsimony principle of minimizing the number or cost of operations, probabilistic models seeking for a reconciliation with maximum likelihood or maximum posterior probability have also been developed [9][10][11].
Regardless of the model, current algorithms for reconciliation take each gene family individually, assuming an independent evolution through single gene gain and loss. Although this hypothesis is reasonable for genes that are far apart in the genome, it is clearly too restrictive for those organized in syntenic blocks or paralogons, i.e. sets of homologous chromosomal regions, among one or many genomes, sharing the same genes (e.g. neuropeptide Y-family receptors [12], the Homeobox gene clusters [13][14][15], the FGFR fibroblast growth factor receptors [16,17] or the genes of the opioid system [18][19][20]). These genes are more plausibly the result of an evolution from a common ancestral region, rather than from a set of independent gene duplications that would have converged to the same organization in different genomic regions.
The purpose of this paper is to generalize the DL reconciliation of a single gene tree, to a set of gene trees, accounting for segmental duplications and losses. As far as we know, this problem has never been considered before. The closest algorithms are DeCo [21] and DeCoStar [22] which, given a set of gene families, a set of adjacencies between genes, a set of gene trees and a species tree, compute an adjacency forest reflecting the evolution of each adjacency. However, adjacencies are taken independently, and only single duplications and losses are considered. A correction strategy that adjusts the computation of the evolutionary cost to favour coevolution events, hence grouping seemingly individual events into single segmental ones was latter proposed in [23]. Another related problem asks for the reconciliation of a set of gene trees leading to a minimum number of duplication episodes, referring to possible whole genome duplication events, defined as sets of single duplications mapped to the same node in the species tree [24,25]. However the considered model does not account for gene orders and duplications involving a set of neighboring genes.
Here, we consider the DL Super-Reconciliation problem (or Super-Reconciliation for short when there is no ambiguity) in which, given a set of gene families, a set of syntenies (chromosomal segments exhibiting similar gene contents), a gene tree for each gene family and a species tree, we seek an evolutionary history of the set of syntenies that is in agreement with the individual gene trees whilst minimizing the number of segmental duplications and losses. Our proposed model is a direct generalization of the reconciliation of a single gene tree. Existency of a Super-Reconciliation depends on individual gene tree consistency. In addition, ignoring rearrangements implies that existency also depends on gene order consistency. We first show that the problem of reconstructing a most parsimonious Super-Reconciliation, if any, is NP-hard and give an exact exponential-time algorithm to solve it. Alternatively, we show that accounting for rearrangements in the evolutionary model, but still only minimizing segmental duplications and losss, reduces to ignoring gene orders in syntenies, and leads to an exact polynomial-time algorithm.
After defining the new Super-Reconciliation model in the next section, we characterize, in the "Existence conditions" section, the conditions under which a Super-Reconciliation exists for a set of syntenies and a set of gene trees, and exhibit a general framework for inferring a most parsimonious DL Super-Reconciliation. We prove, in the "Complexity of the Super-Reconciliation problem" section, that this problem is NP-hard. A dynamic programming algorithm for the main step of the framework is given in the "A Super-Reconciliation for a supertree" section. The "Unordered Super-Reconciliation" section is dedicated to an extension of the original evolutionary model accounting for rearrangements. We give a polynomial-time algorithm for finding a Super-Reconciliation, under this model, minimizing the number of segmental duplications and losses. An application on simulated datasets and a proof of concept on the genes of the opioid system are then presented in the "Application" section. We conclude with a discussion in the "Conclusion" section.

Trees, reconciliation and problem statement
A string or a sequence is an ordered set of characters. Given a string X = x 1 · · · x n , a substring of X is a consecutive set of characters from X in the same order as in X (possibly X itself ), and a subsequence is a set of characters of X in the same order, but not necessarily consecutive in X (X is a substring and a subsequence of X). We also denote by Set(X) = {x 1 , x 2 , ..., x k } the range of X, i.e. the set of all genes contained in X, without any particular order.
All trees are considered rooted. Given a tree T, we denote by r(T) its root, by V(T) its set of nodes and by L(T ) ⊆ V (T ) its leafset. We say that T is a tree for L = L(T ) . A node v is an ancestor of v ′ if v is on the path from r(T) to v ′ ; v is the father of v ′ if it directly precedes v ′ on this path. In this latter case, v ′ is called the child of v. We denote by E(T) the set of edges of T, where an edge is represented by its two terminal nodes (v, v ′ ) , with v being the father of v ′ . Two nodes v and v ′ are separated in T iff neither one is an ancestor of the other. A node is said to be unary if it has a single child and binary if it has two children. Given a node v of T, the subtree of T rooted at v is denoted T [v].
A binary tree is a tree with all internal (i.e. non-leaf ) nodes being binary. If internal nodes have one or two children, then the tree is said partially binary.
Creating a unary root consists of creating a new node v, a new edge (v, r(T)) and assigning v as the new root of T. Grafting a leaf w consists of subdividing an edge (v, v ′ ) of T, thereby creating a new node v ′′ between v and v ′ , then adding a leaf w with parent v ′′ . If W is a rooted tree, grafting W to T corresponds to grafting a leaf w, then replacing w by the root of W.
The lowest common ancestor (LCA) in T of a subset L ′ of L(T ) , denoted lca T (L ′ ) , is the ancestor common to all nodes in L ′ that is the most distant from the root. The restriction T | L ′ of T to L ′ is the tree with leafset L ′ obtained from the subtree of T rooted at lca T (L ′ ) by removing all leaves that are not in L ′ and all unary nodes. Let T ′ be a tree such that L(T ′ ) = L ′ ⊆ L(T ) . We say that T displays T ′ iff T | L ′ is label-isomorphic to T ′ (i.e., isomorphic with preservation of leaf labels). We also say that T is an extension of T ′ . Species, gene and synteny trees (see Fig. 1) The species tree S for a set of species represents an ordered set of speciation events that have led to .
A gene family is a set Ŵ of genes where each gene g belongs to a given species s(g) of . If Ŵ ′ ⊆ Ŵ is a subset of genes, we denote s(Ŵ ′ ) = {s(g) : g ∈ Ŵ ′ }.
A synteny X is an ordered sequence of genes belonging to a genome s(X). We consider that genes of a synteny all belong to different gene families (tandem duplications are ignored). More precisely, let F = {Ŵ 1 , Ŵ 2 , ..., Ŵ t } be a set of gene families, and F = {(g, Ŵ) : g ∈ Ŵ ∧ Ŵ ∈ F} be a function. We say that an ordered sequence of genes X = g 1 g 2 ...g k is a synteny on F iff F is well-defined for all genes of X, F is injective, and all genes in X belong to the same species.
A synteny family is a set X of syntenies. We say that a set F of gene families are organized into a set X of syntenies iff there is a bijection between the genes of F and the genes in X (each gene of F belongs to exactly one synteny of X).
A tree T is a gene tree for a gene family Ŵ (respec. a synteny tree for a synteny family X ) if its leafset is in bijection with Ŵ (respec. X).
Given a gene tree T, the corresponding synteny tree is the tree T obtained from T by replacing each leaf of T by the synteny containing the considered gene.
Given a tree T (either gene tree or synteny tree), we extend the mapping s to internal nodes v of T by defining An evolutionary history is represented by a labeled tree, where the label of a node is its corresponding event.
In the case of gene families, an event is entirely determined by its type, either a duplication, a speciation or a (ii) Ignoring node labels and dotted lines, T, T ′ and T ′′ are the corresponding gene trees and T , T ′ and T ′′ are the corresponding synteny trees. The reconciled gene trees R, R ′ and R ′′ are the same trees but including node labels and dotted lines. Nodes identified by circles are speciations, those represented by rectangles are duplications, and dotted lines represent lost branches. (iii) The reconciled trees embedded into the species tree S. (iv) A Super-Reconciliation R , representing a more realistic evolutionary history from a common ancestral synteny. Each ancestral node is identified by the synteny, the event and the segment of the synteny affected by the event. Square nodes represent Dup events, round nodes Spe events, brackets pLoss events and dotted lines fLoss (see text) loss. The labels of a gene tree are obtained through reconciliation, as described below. Note that in a reconciliation, we only choose s(l) for the grafted leaves, and the value of s(v) for the internal nodes is entirely determined by the leaves descending v. Given a gene tree T and a species tree S, a minimum reconciliation, i.e. a reconciliation of minimum cost, is obtained from the LCA-mapping which consists in setting s(v) = lca S (s(L(T [v]))) for each v ∈ V (T ) , and labeling each internal node v of T as a speciation if and only if s(v l ) and s(v r ) are separated in S, and as a duplication otherwise. Observe that in any case, if s(v l ) and s(v r ) are not separated, then it is impossible for v to be a speciation. We denote by LCA-Reconciliation the reconciliation labeled by means of the LCA-mapping. Before extending the reconciliation concept to a set of gene trees, we need to specify an evolutionary model for syntenies. In this paper, syntenies are considered to have evolved from a single ancestral synteny through speciations (defined as for single genes), segmental duplications and segmental losses, where:

Reconciliation
• A speciation Spe(X, [1, l]) acting on a synteny X = g 1 · · · g l belonging to a genome s(X) has the effect of reproducing X in the two genomes s l and s r children of s(X) in S. • A (segmental) duplication Dup(X, [i, j]) acting on a synteny X belonging to a genome s(X) is an operation that copies a substring g i · · · g j of size j − i + 1 of X = g 1 g 2 · · · g i · · · g j · · · g l somewhere else into the genome s(X), creating a new copied synteny X ′ = g ′ i · · · g ′ j where each g ′ k , for i ≤ k ≤ j belongs to the same gene family as g k ; we say that the copied synteny is partial if [i, j] � = [1, l].
• A (segmental) loss Loss(X, [i, j]) acting on a synteny X = g 1 · · · g i · · · g j · · · g l is an operation that removes a substring g i · · · g j of size j − i + 1 of X, leading to the truncated synteny X ′ = g 1 · · · g i−1 g j+1 · · · g l . A loss is called full if X ′ is the empty string (i.e. all genes of X are removed) and partial otherwise. We may a denote full loss event as fLoss and a partial loss event as pLoss.
An evolutionary history of a set of syntenies can thus be represented as a partially binary tree where leaves correspond to extant syntenies and lost syntenies (resulting from full losses), and each internal node v corresponds to an event E(X, [i, j]) with E ∈ {Spe, Dup, pLoss} . Thus, in contrast to a single gene family, a tree representing the evolution of a set of syntenies is not only labeled by the type of event corresponding to each internal node, but also by the segment of the synteny affected by the event (see the bottom-right tree in Fig. 1). If E is: 1. Spe, then v is a binary node with two children corresponding to syntenies Y and Z such that X = Y = Z and s(Y) and s(Z) being the two children of s(X) in S. 2. Dup, then v is a binary node with two children corresponding to syntenies X and X ′ = X[i, j] , where s(X) = s(X ′ ). 3. pLoss, then v is a unary node with a child corresponding to the truncated synteny X ′ = X[1, i − 1]X[j + 1, l] , and s(X) = s(X ′ ).
The topology of a tree representing the evolution of a set of syntenies differs from that of a single gene family since the former may contain unary nodes, resulting from partial losses, while the latter only contains binary nodes.
Our goal is to infer an evolutionary history of a set of syntenies which is a reconciliation of a set of individual gene trees, formally defined below.
· · · , T t } be a set of binary gene trees for the gene families F = {Ŵ 1 , Ŵ 2 , · · · , Ŵ t } organized into a set X of syntenies belonging to a set of taxa, and let S be a binary species tree for . For each i, 1 ≤ i ≤ t , let T i be the synteny tree corresponding to T i .
A Super-Reconciliation R(G, S) of G with S is a labeled synteny tree which is an extension of the trees T i , for 1 ≤ i ≤ t , representing a valid history for X.
The cost of a Super-Reconciliation R(G, S) is the number of induced Dup, fLoss and pLoss events. For example, the cost of the Super-Reconciliation in Fig. 1 is 5. Notice that, although this cost is higher than that obtained by considering each gene family independently (cost of 3), the induced history is much more realistic as it is unlikely that independent gene duplications would have led to the same gene organization in different genomic regions.
We are now ready to state the optimization problem considered in this paper.
super-reconciliation problem: Input: A set of species and a species tree S for ; a set of gene families F = {Ŵ 1 , Ŵ 2 , · · · , Ŵ t } organized into a set of syntenies X ; a set of gene trees G = {T 1 , T 2 · · · , T t } one for each family of F .
Output: A Super-Reconciliation R(G, S) of minimum cost.

Existence conditions
As a synteny is represented by a gene order and can only be modified through losses (duplications create new syntenies but do not modify existing syntenies), an evolutionary history does not always exist for a set of syntenies X , regardless of the trees linking them. If this holds, the syntenies are said to be order consistent.
In addition, in contrast to the reconciliation of a single gene tree which always exists, this is not the case for a Super-Reconciliation as different gene trees may exhibit inconsistent speciation histories for the same syntenies.
The following two subsections are dedicated to characterizing the gene order and gene tree conditions required for the existence of a Super-Reconciliation.

Consistency of gene orders
Given a set of gene families F = {Ŵ 1 , Ŵ 2 , · · · , Ŵ t } organized into a set of syntenies X , we define the precedence graph P as the directed graph with n vertices, each corresponding to a gene family of F , such that a directed edge (i, j) between two vertices i and j exists iff there is a synteny If P is acyclic, then P is a Directed Acyclic Graph (DAG). In this case, there is a topological sorting for P , i.e., a linear ordering X of vertices such that for every directed edge (i, j) in P , i precedes j in X. Verifying if a directed graph is acyclic and finding a topological sorting of a DAG is a classical problem solvable in linear time.
The following lemma gives necessary and sufficient conditions for a set of syntenies to be order consistent and exhibits the set of possible ancestral syntenies.

Lemma 1 (Order consistency condition)
Let F = {Ŵ 1 , Ŵ 2 , · · · , Ŵ t } be a set of gene families organized into a set X of syntenies. Then X is order consistent iff the corresponding precedence graph P is acyclic. In this case, any topological sorting for P is an order consistent ancestral synteny for X.
Proof The first part of the lemma follows from the fact that a directed graph has a topological sorting if and only if it is acyclic. The second part follows from the fact that, for any topological sorting A for P and any synteny X of X , X is a subsequence of A, and thus X can be obtained from A through losses.
The ancestral synteny A at the root of a Super-Reconciliation R(G, S) is an order on F . Moreover, as the synteny at each internal node of R(G, S) is obtained from A through losses, a synteny at each internal node of R(G, S) should be a subsequence of A. More generally, for any

Consistency of trees
A set of trees on subsets of X is said consistent iff, for any triplet Trp = {X 1 , X 2 , X 3 } of distinct elements of X , all trees containing Trp as a sub-leafset exhibit the same topology for Trp.

Lemma
2 (Tree consistency condition) Let G = {T 1 , T 2 , · · · , T t } be a set of gene trees for a set of gene families organized into a set X of syntenies, and let S be the species tree. If a Super-Reconciliation R(G, S) exists, then the set of corresponding synteny trees {T 1 ,T 2 , · · ·T t } is consistent.
Proof By definition, a Super-Reconciliation R(G, S) displays T i , for all 1 ≤ i ≤ t , as R(G, S) is an extension of each tree. Thus, for any triplet Trp = {X 1 , X 2 , X 3 } of X , if T i and T j contain the triplet Trp as a sub-leafset, then R(G, S) displays both T i | Trp and T j | Trp . In other words, T i | Trp and T j | Trp are label-isomorphic.
The consistency problem of rooted trees has been widely studied. The BUILD algorithm [26] can be used to test, in polynomial-time, whether a collection of rooted trees is consistent, and if so, construct a compatible, not necessarily fully resolved, supertree, i.e. a tree displaying them all. This algorithm has been generalized to output all compatible minimally resolved supertrees [27][28][29], which may be exponential in the number of genes.
The following theorem makes the link between a supertree and a reconciliation.
T t } be a set of trees for a set of families organized in an order-consistent set of syntenies X , and S be the species tree. Let G = {T 1 ,T 2 · · · ,T t } be the set of synteny trees corresponding to those in G . If G is a consistent set of trees then: is an extension of a supertree for G ; 2. Any supertree is the "backbone" of a Super-Reconciliation. Namely, for any supertree T for G , there is a Super-Reconciliation R(G, S) which is an extension of T .
The first statement of Theorem 1 follows from Lemma 2. As for the second statement, we will prove it implicitly in the "A Super-Reconciliation for a supertree" section by providing an algorithm that yields a minimum cost reconciliation on any supertree.
Following Theorem 1, the problem reduces to finding a supertree for the set of synteny trees minimizing the number of segmental duplications and losses. A natural algorithm for the super-reconciliation problem follows: 1. Explore the space of all order consistent ancestral syntenies A for X; 2. Explore the space of all supertrees T for G ; 3. Find a Super-Reconciliation of minimum cost which is an extension of T with A as an ancestral synteny; 4. Select the Super-Reconciliations leading to the minimum cost.
Step 1 and Step 2 have been discussed in this section. Before developing an algorithm for Step 3, which is the purpose of the "A Super-Reconciliation for a supertree" section, we begin by analyzing the theoretical complexity of the super-reconciliation problem.

Complexity of the Super-Reconciliation problem
We have recently considered the problem of finding a supertree of a set of gene trees minimizing the classical single gene duplication and single gene duplication and loss distances. The problem has been shown NP-hard for the duplication distance, and exponential-time algorithms have been developed for both distances.
For segmental duplications only, the hardness of super-reconciliation is almost immediate from the results of [30]. For both duplications and losses, the problem remains NP-hard, although the proof is far more technical. Here we give the simpler proof of hardness for minimizing duplications only, and refer the reader to Additional file 1 for the NP-hardness proof for minimizing segmental duplications and losses.

Theorem 2
The super-reconciliation problem is NP-hard for the duplication cost. Furthermore, the minimum number of duplications is hard to approximate within a factor n 1−ǫ for any 0 < ǫ < 1 , where n is the number of syntenies in the input.
Proof The hardness follows from that of the mindupsupertree problem, defined as follows. Given a species tree S and a set of gene trees T 1 , . . . , T k , possibly with overlapping leafsets, mindup-supertree asks for a supertree T that displays T 1 , . . . , T k such that the LCAreconciliation of T and S yields a minimum number d of duplications. It was shown in [30] that it is NP-hard to approximate d within a factor n 1−ǫ for any 0 < ǫ < 1 , where here n is the number of genes in To reduce mindup-supertree to the super-reconciliation problem, it essentially suffices to exchange the roles of genes and syntenies. More precisely, given an instance of mindup-supertree consisting of a species tree S and gene trees T 1 , . . . , T k , we compute an instance of super-reconciliation as follows. The species tree is the same as S, and for each gene g ∈ Ŵ , we have a synteny X g with s(X g ) = s(g) whose gene content will soon be defined. For each gene tree T i , we create an identical gene tree T ′ i , but in which each gene g ∈ L(T i ) is replaced by a unique gene g T i that belongs to synteny X g (and hence s(g) = s(g T i ) = s(X g ) ). Thus X g has one gene g T i for each occurrence of g in a tree T i (recall that a gene can occur in multiple trees). The ordering of the genes of X g is arbitrary (since we are not counting segmental losses), but the ordering must be order-consistent. This is easily achieved by ordering the g T i 's of each synteny X g in ascending order of their i indices. Note that the synteny tree T i for T ′ i is obtained by replacing each leaf g of T i by X g . Also observe that there are n syntenies.
It only remains to show the correspondence between the solutions for the two problem instances. Suppose that the mindup-supertree instance admits a supertree T with d duplications when reconciled. Let T be the synteny tree obtained from T by replacing each gene g ∈ L(T ) by X g . Because s(g) = s(X g ) , both T and T have the same duplications under the LCA-reconciliation, which is d. One can assign a synteny X at the root of T that satisfies our constraints defined by the precedence graph. We assign the same synteny X at every internal node (so no partial losses or partial duplications), and partial losses can be added on each edge linking a leaf X g with its parent to obtain the X g synteny. As we are not counting losses, these are irrelevant and we achieve a cost of d duplications. Conversely, assume that the super-reconciliation instance formed by T ′ 1 , . . . , T ′ k and S admits a synteny tree T with d duplications. We may replace each leaf X g by g, yielding an extension of a supertree T for the mindup-supertree instance. After suppressing unary vertices, this results in a reconciled gene supertree with d duplications. Because the value of the solutions are preserved and n = |Ŵ| corresponds to the number of syntenies, this reduction is approximation-preserving and the hardness result follows.
We state our second hardness result formally here.

Theorem 3
The super-reconciliation problem is NP-hard for the Dup, fLoss and pLoss cost.

A Super-Reconciliation for a supertree
In this section, we are given a set G = {T 1 , T 2 , · · · , T t } of consistent gene trees for a set of families F = {Ŵ 1 , Ŵ 2 , · · · , Ŵ t } organized in an order consistent set of syntenies X , and a species tree S for the set of taxa containing the genes. In addition, we are given a supertree T for the synteny trees G = {T 1 ,T 2 , · · · ,T t } corresponding to those in G , and an order consistent ancestral synteny A for X.
Given a Super-Reconciliation R(G, S) (R for short), because R is obtained from T by grafting leaves, each node of T is present in R. Hence we say that v ∈ V (T ) has a corresponding node v ′ in R. More precisely, if l ∈ L(T ) , then l ∈ L(R) also and the correspondence is immediate.
If v is an internal node of V (T ) , the node v ′ of R corresponding to v is lca R ({l : l ∈ L(T [v])}) . We show that, as in the traditional reconciliation setting, the nodes of R that are also in T should be mapped to the lowest species possible. To simplify the argument, we will call an internal node a full loss if it is the parent of a fLoss event. For later reference, we note that the proofs of Lemma 3 and Lemma 4 do not involve the gene orders in any way. Proof First, observe that the statement is clearly true for the leaves. Assume that the statement is false. Now, let v be a node of T such that its corresponding node v ′ does not satisfy the statement-moreover, choose v to be a minimal node with this property (meaning that for the children v l and v r of v, the corresponding nodes v ′ l and v ′ r in R(G, S) satisfy s(v ′ l ) = lca S (s(L(T [v l ])) and ). Note that v must exist, since the statement is true for the leaves. Now, we may assume that s(v ′ ) � = lca S (s(v ′ l ), s(v ′ r )) , as otherwise v ′ satisfies the lemma. Thus in S, there are at least k edges on the path from s(v ′ ) to lca S (s(v ′ l ), s(v ′ r )) , where here k > 0 . It is not hard to verify that in this case, v ′ must be a duplication node, according to the definition of a reconciliation. This implies that there are at least k full losses on the path from v ′ to v ′ l and at least k full losses on the path from v ′ to v ′ r . Consider the Super-Reconciliation R ′ that is identical to R(G, S) , with the exception that . Then the 2k losses on the paths between v ′ and v ′ l and between v ′ and v ′ r are not needed anymore, although if v ′ is not the root, k losses become necessary on the path between v ′ and w ′ , where w ′ is the node corresponding to the parent w of v in T . Remapping v ′ cannot increase the number of duplications, and so we have saved k losses.
It remains to argue that the number of partial losses remains the same. But this is easy to see. We keep the same synteny assignment at nodes v ′ , v ′ l and v ′ r (and w ′ if v ′ is not the root) as in R(G, S) . If v ′ was a segmental duplication in R(G, S) , we set v ′ to be a segmental duplication in R ′ as well. The number of partial losses on the paths between v ′ and v ′ l , v ′ r (and w ′ ) therefore remains the same as in R(G, S) .
We now show that speciation and duplication nodes are easy to identify. Essentially, we may set the events of internal nodes as in the classical LCA-mapping reconciliation. In what follows, assume that T is reconciled under the LCA-mapping, and put s(v) = lca S (L(s(T [v]))) for every v ∈ V (T ).

Lemma 4 Let R(G, S) be a Super-Reconciliation of minimum cost which is an extension of T .
Let v ∈ V (T ) be an internal node of T and let v ′ be its corresponding node in R(G, S) . Moreover let v l and v r be the children of v. If s(v l ) and s(v r ) are separated in S, then v ′ is a speciation, and otherwise v ′ is a duplication.
Proof Let v ′ l and v ′ r be the nodes corresponding to v l and v r , respectively, in R(G, S) . First, if s(v l ) and s(v r ) are not separated, then by Lemma 3, s(v ′ l ) and s(v ′ r ) are not separated, hence it is not possible for v ′ to be a speciation. Therefore v ′ must be a duplication.
Suppose instead that s(v l ) and s(v r ) are separated in S, but that v ′ is labeled by a duplication event Dup(X, [i, j]), where X is the synteny assigned at v ′ . On the path from v ′ to v ′ l , there may be some pLoss events and some nodes that were grafted owing to full losses. We may assume that all full loss events, if any, have occurred before the pLoss events on this path (i.e., nodes grafted from full losses are closer to v ′ ). This is without loss of generality, as this does not change the resulting synteny in v ′ l . We shall make the same assumption with the path from v ′ to v ′ r . Now, by Lemma 3, s(v ′ ) = lca S (s(v l ), s(v r )) . Because v ′ is a duplication, the two children w l , w r of v ′ in R(G, S) must satisfy s(w l ) = s(w , and therefore w l and w r were grafted on T due to full losses. If we label v ′ as a speciation Spe(X, [1, |X|]), these two full losses are not needed anymore, and by doing so we have one duplication less and two full losses less. Let Y l and Y r be the two syntenies that are assigned at w l and w r in R(G, S) , respectively. Then Y l = X and Y r = X[i, j] or vice-versa (assume the former, without loss of generality). Suppose that w r is an ancestor of v ′ r in R(G, S) , again without loss of generality. The substring X[i, j] can be obtained from X by adding at most two partial losses on the path from v ′ to v ′ r . The rest of the reconciliation can remain the same. To sum up, we have removed one duplication and two full losses, and inserted at most two partial losses to reproduce the effect of the segmental duplication. This contradicts that R(G, S) is a reconciliation of minimum cost.
From Lemma 4, it follows that we know the event-type (Dup or Spe) of each internal node of the supertree T . It then remains to extend the tree with losses and infer the actual event at each node (i.e., the corresponding synteny and segment being duplicated or lost). It is easy to see that losses and segments affected by the events are fully determined by gene orders assigned to internal nodes. Therefore, the problem reduces to the classical "small phylogeny problem" generally defined as follows: Given an alphabet (nucleotides or amino-acids or genes), a distance on the set of words of (edit distance for gene sequences or rearrangement distances for gene orders) and a tree T with leaves being words on (extant gene sequences or gene orders), find the labeling of ancestral nodes (ancestral sequences or orders) minimizing the total cost of the tree. This cost is the sum of costs of each branch, which is the distance between the two words connected by the branch.
Here, we are given a synteny tree T for a set X of syntenies on a set of gene families F , and an ancestral synteny A which is an order of F . We want to find a synteny assignment attributing a partial order on F to each node of V (T ) . We assume that the root r of T is assigned the synteny A. It follows from the considered evolutionary model that, for two nodes u and v of T with u being an ancestor of v, the synteny X v assigned to v should be a subsequence of the string X u assigned to u. A synteny assignment verifying this condition is called a valid synteny assignment for T .
For v ∈ V (T ) , define d(v, X) as the minimum number of segmental duplications and losses induced by a synteny assignment on T [v] with X being the assignment at v. The small-phylogeny for syntenies problem is to find an optimal assignment, i.e. an assignment leading to d(T ) = min X d(r(T ), X) for X belonging to the set of syntenies that are order consistent with X.
Solving this problem can be done by dynamic programming by computing d(v, X), for each v ∈ V (T ) and each possible synteny X.
Let v be an internal node of T and v l , v r be its two children. Let X, X l , X r be valid assignments for respectively v, v l and v r . Then X l and X r are subsequences of X. If v is a speciation, then all missing genes in X l and X r are the result of losses. Otherwise, if v is a duplication, then for at most one of X l and X r , the missing prefix or suffix can be due to the partial duplication of a segment of X, and all other missing genes should be the result of losses. This motivates the following two variants of the loss distance between two syntenies.
Let X and Y be two syntenies with Y being a subsequence of X. We let D T (X, Y ) denote the minimum number of segmental losses required to transform X to Y and D P (X, Y ) the minimum number of segmental losses required to transform a substring of X to Y.

Theorem 4
Let v be a node of T , X be a synteny and S(X) be the set of subsequences of X.
• If v is a leaf, then d(v, X) = 0 if X is the extant synteny corresponding to leaf v, and +∞ otherwise; • If v is a speciation with children v l and v r , then, • If v is a duplication node with children v l and v r , then The above can be used to solve the small-phylogeny for syntenies problem with dynamic programming. To do this, one can simply traverse T in post-order, and apply the recurrences of Theorem 4 at each node encountered. We finish this section by analyzing the complexity of this algorithm. Let n = |V (T )| and let t be the number min (X l ∈S(X)) (D T (X, X l ) + d(v l , X l ))+ min (X r ∈S(X)) (D P (X, X r ) + d(v r , X r )), min (X l ∈S(X)) (D P (X, X l ) + d(v l , X l ))+ min (X r ∈S(X)) (D T (X, X r ) + d(v r , X r ))  [31] (it is worth noting however that counting the number of such topological sortings in #P-complete [32]). Therefore, if t is not too large, then the above recurrences can solve the small phylogeny problem relatively quickly, even if n is large. Put differently, the small-phylogeny for syntenies problem is fixedparameter tractable with respect to parameter t.

Unordered Super-Reconciliation
The strongest and less biologically supported condition for the existency of a DL Super-Reconciliation is probably gene order consistency. In fact, genomes being subject to rearrangements shuffling gene organization, it is hard to expect that a set of homologous chromosomal segments in phylogenetically distant genomes would exhibit the same gene order. In other words, we can hardly ignore the presence of rearrangements in the evolutionary history leading to a set of homologous genomic regions.
The small phylogeny problem, which consists in inferring ancestral gene orders minimizing a given rearrangement distance, has been extensively studied (see for example [33][34][35][36][37]). Algorithmic developments and results differ depending on the considered rearrangement distance. The most studied one is probably the DCJ distance, accounting for artificial movements implicitely mimicking inversions and transpositions [38,39].
Almost all versions of the small phylogeny problem with rearrangements have been proven NP-hard, even those accounting for equal gene content for all genomes [40]. Heuristics have also been developed for inferring ancestral gene orders minimizing rearrangements, duplications and loss events (reviews can be found in [41,42]). Extension of these heuristics to the Super-Reconciliation problem is certainly possible, but can only increase the intractability of the original problem.
Here, we explore a compromise which consists in considering an evolutionary model accounting for segmental duplications, losses and rearrangements, but yet only minimizing duplication and loss events. In other words, gene orders are not important anymore, as we can use as many rearrangements as we want for obtaining the required orders.
Reducing syntenies to their range sets, an unordered evolutionary history of a set of syntenies can be represented as a partially binary tree where each internal node v corresponds to an event E(Set(X)) with X = synteny(v) being the synteny at v and E ∈ {Spe, Dup, pLoss} such that, if E is: 1. Spe, then v is a binary node with two children corresponding to syntenies Y and Z such that Set(X) = Set(Y ) = Set(Z) and s(Y) and s(Z) are the two children of s(X) in S. 2. Dup, then v is a binary node with two children corresponding to syntenies Y and Z such that Set(Y ) = Set(X) , Set(Z) ⊆ Set(X) and s(X) = s(Y ) = s(Z). 3. pLoss, then v is a unary node with a child corresponding to a synteny Y such that Set(Y ) Set(X) and s(X) = s(Y ).
If no ambiguity on the synteny of v, we will denote by Set(v) the range set of the synteny at node v of tree T (in other words, Set(v) = Set(synteny(v)). An Unordered Super-Reconciliation (USR) R u (G, S) of a set G = {T 1 , T 2 , · · · , T t } of gene trees with a species tree S is a labeled synteny tree which is an extension of the trees T i , for 1 ≤ i ≤ t , representing a valid unordered evolutionary history for X . The cost d(R u (G, S)) of such an unordered Super-Reconciliation is the number of induced Dup, fLoss and pLoss events.
The unordered super-reconciliation problem then consists in inferring the USR of minimum cost. Notice that, as gene order is ignored, at most one pLoss can separate two binary nodes on a most parsimonious USR.
Regarding existence conditions, Lemma 2 and Theorem 1 clearly apply to the USR problem, as gene order information is not involved in tree consistency. Namely, an USR exists if and only if the trees of G are consistent, and in this case any supertree for G is the backbone of an USR. Lemma 3 and Lemma 4 also apply since, as mentioned before, their proofs do not involve gene orders. Therefore, we may assume that, if a supertree T of syntenies is given, its nodes can be mapped according to the LCA-mapping and its speciation/duplication nodes identified in this way. The USR problem thus reduces to a small phylogeny problem which consists in inferring internal node gene contents of the supertree T leading to a minimal duplication and loss cost. As duplications are already determined by the node labeling of T , only loss events remain to be minimized. Notice that the root's gene content is just F .
We add to T the fLoss branches obtained from the LCA-Reconciliation of T with S. In other words, the new tree is an intermediate between T and R u (G, S) . For practical reasons, we still call it T . Notice that fLoss branches can only create speciation nodes. For the requirements of the following algorithms, the empty synteny is assigned to the leaf created by an fLoss branch.
We now present a dynamic programming algorithm to find the minimum number of pLoss events required for a USR.

A dynamic programming approach for optimal USRs
Given an USR R, we denote by Set R (v) the range set of the synteny assigned to v in R. For an internal node v of T , denote as the set of all gene families that appear in a synteny under v. Note that v must have a gene in every family in lca Set (v) . For a range set X, denote by C X (v) the minimum cost of an USR R between T [v] and S in which we assign Set R (v) = X (if lca Set (v) is not a subset of X, put C X (v) = ∞ ). We denote C lca (v) := C lca Set (v) (v) , i.e. the cost when we assign the smallest possible range set to v. If v is a leaf, we have C lca (v) = 0 and C X (v) = ∞ for any X = Set(v) . The value we are interested in is C lca (r) , where r is the root of T .
We first show that the exact nature of the "extra" content that might be assigned to an internal node v is irrelevant for the computation of the optimal cost.

Lemma 5
Let v ∈ V (T ) be an internal node of T , and let X, Y be any range sets satisfying lca Set (v) X, Y . Then Proof This can be shown by induction on the depth of the nodes of T . The lemma is true for leaves, as

Set(l)
an internal node. Let R be a minimum USR of T [v] in which Set R (v) = X . We build a reconciliation R ′ in which Set R ′ (v) = Y . Consider the children v 1 and v 2 of v in T . If Set R (v 1 ) = lca Set (v 1 ) , then either there is a pLoss node on the vv 1 path in R, or v is a duplication and X was partially duplicated. In any case for our USR R ′ , we can use this pLoss or duplication to lose Y \ lca Set (v 1 ) , and assign Set R ′ (v 1 ) = lca Set (v 1 ) without incurring additional cost compared to R. We then use the same reconciliation as R for the subtree T [v 1 ] , and thus R ′ incurs no extra cost on the v 1 side. If instead Set R (v 1 ) strictly contains lca Set (v 1 ) , then in R ′ we put Set R ′ (v 1 ) = Y without requiring any pLoss on the vv 1 path. Moreover by induc- . It follows that R ′ has as many losses as R in the T [v 1 ] subtree -and since there is no loss on the vv 1 branch, R ′ has at most as many losses as R on the v 1 side (note that R ′ could have strictly less losses than R on the v 1 side if R had a loss on the vv 1 branch -this implicitly means that R had no such loss, as otherwise our R ′ will end up having less losses than R and contradict its optimality). Now, it suffices to observe that the same scheme can be applied to v 2 as well (noting that losses saved by partial duplications cannot happen on both sides of v), showing that there is an R ′ that is of cost no more than R.
Lemma 5 implies that there are two possible minimum loss costs for T [v] . Either v is assigned lca Set (v) and its cost is C lca (v) , or it is assigned X with extra content and its cost is C X (v) , for any X strictly containing lca Set (v) . We will therefore denote by C * (v) the minimum loss cost of T [v] when v is assigned any X such that X = lca Set (v) . This leads to a dynamic programming formulation that takes into account the two cases. For an internal node v, define spec(v) = 1 if v is a speciation, and spec(v) = 0 otherwise. The value of C * (v) can be computed according to the following Lemma.

Lemma 6
For an internal node v of T with children v 1 and v 2 , we have Proof Let R be an optimal USR in which Set R (v) = X � = lca Set (v) . It follows that X = lca Set (v 1 ) and X = lca Set (v 2 ) . The lemma lists all the possible ways of sending extra content to the children or not. In the first case, we have two losses: we lose X \ lca Set (v 1 ) and X \ lca Set (v 2 ) on both the vv 1 and vv 2 branches, respectively (if v is a duplication, we can save one loss in a partial duplication, hence the spec(v) term). In the second and third cases, we lose content only on one side (again potentially using a partial duplication), and in the last case, we transfer X to the children without incurring any loss.
The computation of C lca (v) has more cases, depending if the children of v have the same lca Set value or not. We show in Algorithm 1 how C lca (v) can be computed. We omit the proof of correctness for this algorithmn as it is similar to that of Lemma 6.
It is now clear that if the values of C lca (v i ) and C * (v i ) are known for the children v 1 , v 2 of v, then C lca (v) and C * (v) can be computed in constant time, assuming we have access to lca Set (v) for every v ∈T . By computing these values in a post-order traversal of T , we can compute C lca (r) for the root of T in time O(|V (T )|) . It is also straightforward to conceive a backtracking procedure to construct an actual USR. Moreover, every optimal solution can be produced by our dynamic programming paradigm.
This algorithm requires computing lca Set (v) for every vertex, which can be accomplished in time O(|V (T )||F |) (recall that F is the set of gene families). This actually dominates the running time.

Simulated datasets
The dynamic programming algorithm that ignores rearrangements has been implemented in C++ 1 and tested on balanced trees obtained from simulated evolutionary histories. Simulations have been performed according to five parameters: t, the number of gene families in the ancestral synteny; d, the maximum depth of the balanced tree; p dupl , the probability for any given node to be a segmental duplication; p loss , the probability for a loss to occur under any given node; and p length , the probability to remove one gene in a segmental loss, defining the probability for a loss to remove k genes (for k ∈ {1, 2, 3, ..} ): P(X = k) = (1 − p length ) k−1 p length , following a shifted geometric distribution.
Simulations yield Super-Reconciliations leading to fully labelled trees. The input of the Super-Reconciliation algorithm is then obtained from those trees by removing loss nodes and synteny information on the internal, nonroot nodes.
From an accuracy point of view (results not shown), as expected the larger the density of duplication and loss events, the further is the simulated history from a most parsimonious history, and thus from the inferred tree.
As for time-efficiency, values for inferring the Super-Reconciliation of a single tree, aggregated over 500 simulations per value of t, the size of the ancestral synteny  Fig. 2, for an ancestral synteny of size 5, simulations exhibit a running time of no more than few seconds for trees with depth up to 15, representing balanced trees with up to 2 15 leaves. Apart from genomic segments related through a recent whole genome duplicatiom event, real biological datasets are more likely to reveal large gene families rather than large sets of gene families evolving in concert. Thus, the increase in running time according to the size of the ancestral synteny is unlikely to be a bottleneck towards applying our Super-Reconciliation algorithm. The particular case of whole genome duplication is however worth exploring in more details.

The opioid system
The opioid receptors, important regulators of neurotransmission and reward mechanisms in mammals, offer an interesting proof of concept, as these genes are present in clusters with conserved synteny in vertebrate genomes.
Three genes for the opioid receptors (OPR) were identified and named OPRD1 (delta), OPRK1 (kappa) and OPRM1 (mu). A fourth gene was later found (OPRL1) in rodents and human. In human, they are located on chromosomes 1, 6, 8 and 20.
Previous studies have considered the duplication scenario explaining the evolution of the opioid receptor genes [18][19][20]. The main question was whether observed paralogons arose from the two whole genome duplication events, often called 1R and 2R, known to have occurred early in vertebrate evolution.
By exploring regions surrounding the OPR genes in human, four syntenic regions, containing genes from three other families (NKAIN, SRC-B and STMN) apparently sharing a common history, were identified. From the analysis of individual gene trees (neighbor-joining and quartet-puzzling maximum likelihood trees), conclusions associating the evolution of the opioid system related genes to the 1R and 2R events were drawn.
Here, we consider the same four gene families OPR, NKAIN, STMN, and SRC-B, and further extend the OPR family with two neuropeptide NPBWR receptors, known to be closely related to the opioid receptors ( Fig. 3(i)). Protein sequences and gene orders were downloaded from the Ensembl database (Release 92) 2 for the following five species: Homo sapiens, Mus musculus, Gallus gallus, Lepisosteus oculatus (spotted gar) and Drosophila melanogaster. Gene orders are given in Fig. 3(ii).
For each gene family, we built a multiple sequence alignment with ClustalW [43] (Gonnet weight matrix and gap opening and extension penalties respectively set to 10 and 0.2). Maximum likelihood gene trees were subsequently constructed for each family using MEGA7 [44] (Jones-Taylor-Thornton substitution matrix and uniform rates among sites). As some syntenies contained paralogs (multiple copies from the same gene family, for example synteny H 3 contains two 'a'), duplicates were removed so as to maximize gene tree consistency. Although gene trees were still inconsistent, the overall clustering of gene copies was preserved among gene trees, and consistency could be attained after some local adjustments, using the species tree as reference.
The obtained Super-Reconciliation is given in Fig. 3(iii). Notice however that gene orders are far from being consistent. In fact, all considered genomes are separated by a considerable evolutionary distance, and therefore, local rearrangements could have occurred along each lineage-specific branch. Choosing the (h, s, a, n) order on every node of the tree and assuming rearrangements to occur at terminal edges, i.e. after duplication and loss events, leads to a history of three duplications and two losses before the speciation of bony fish and tetrapods, with two duplications correlating with the 1R and 2R tetraploidization events. This result is in agreement with previous studies on the opioid receptor genes [18]. Further analysis, using more genes and species, is required to provide a more detailed scenario for the evolution of the opioid receptor genes. Our objective here however, was not to verify a given hypothesis, but rather to provide a proof of concept and explore the applicability and limitations of the proposed reconciliation model on real data.

Conclusion
We have presented a natural extension of the DL Reconciliation model to handle segmental duplications and losses. This is the first effort towards developing a unifying automated method framework for reconciling a set of gene trees. We provide computational complexity results and a general inference method.
However, as the considered evolutionary model is restricted to losses and transposed duplications, the possibility of application to real datasets remains very limited. In particular, a duplication and loss history does not always exist for a set of syntenies if rearrangements are ignored, as the corresponding gene orders may be inconsistent. One solution would be to minimally correct gene orders to ensure consistency, before applying the DL Super-Reconciliation model. In this paper, we have considered an alternative way of working around this problem, which consists of extending the evolutionary model to account for rearrangements, but still only minimize duplication and loss events. The underlying Unordered Super-Reconciliation problem has been shown tractable. However, this way of integrating rearrangements is far from being fully satisfactory as the obtained evolutionary history may lead to a prohibitive number of rearrangements. In other words, the problem of Super-Reconciliation with rearrangements remains open.
Another strong constraint is the fact that tandem duplications, leading to syntenies with multiple gene copies, are ignored. In fact, only transposed duplications, i.e. duplications creating new syntenies, are allowed. Although the Super-Reconciliation model can easily be extended to tandem duplications by allowing for unary duplication nodes, the inference methodology developed in this paper is hardly applicable in this context. In particular, gene order consistency is a more challenging problem in presence of interleaving tandem duplications. In addition, having many gene paralogs in syntenies lead to multi-labeled trees (or mul-trees), i.e. trees with many leaves with the same label. This raises the issue of finding an appropriate definition of mul-tree consistency of a "mul-supertree". But more importantly, what would be the meaning of a synteny mul-supertree, with the same synteny labeling more than one leaf? Clearly such a