Skip to main content
Springer logoLink to Springer
. 2020 Nov 21;82(12):151. doi: 10.1007/s11538-020-00832-w

Phylosymmetric Algebras: Mathematical Properties of a New Tool in Phylogenetics

Michael Hendriksen 1,2,, Julia A Shore 3
PMCID: PMC7680336  PMID: 33221986

Abstract

In phylogenetics, it is of interest for rate matrix sets to satisfy closure under matrix multiplication as this makes finding the set of corresponding transition matrices possible without having to compute matrix exponentials. It is also advantageous to have a small number of free parameters as this, in applications, will result in a reduction in computation time. We explore a method of building a rate matrix set from a rooted tree structure by assigning rates to internal tree nodes and states to the leaves, then defining the rate of change between two states as the rate assigned to the most recent common ancestor of those two states. We investigate the properties of these matrix sets from both a linear algebra and a graph theory perspective and show that any rate matrix set generated this way is closed under matrix multiplication. The consequences of setting two rates assigned to internal tree nodes to be equal are then considered. This methodology could be used to develop parameterised models of amino acid substitution which have a small number of parameters but convey biological meaning.

Keywords: Phylogenetic methods, Graph theory, Matrix algebras, Rate matrices, Matrix models, Rooted trees

Introduction

Phylogenetics is the study of constructing phylogenetic trees that represent evolutionary history. Analysis of RNA, DNA and protein sequence data with the use of continuous time Markov chains to measure the frequency of occurrence of point mutations is commonly employed in this field. From a continuous time Markov chain, transitions matrices (whose matrix entries represent probabilities of a change of state for a set time period) and rate matrices (whose entries represent the rates of change between states) can be generated. Transition matrices in phylogenetics are typically classified as either empirical, where the transition probabilities are values which have been calculated by analysing sequence data, or parameterised, where transition probabilities are represented by free parameters which are chosen to fit data as needed (Yang 2014). Given that a parameterised transition matrix contains free parameters, it can be thought of as a set of transition matrices and such a set is often referred to as a model where the set of transition matrices is denoted by M and the set of corresponding rate matrices is denoted by Q. Parameterised models are often developed to be consistent with biological and chemical mechanisms (e.g. the K2P model Kimura 1980 captures the fact that it is chemically easier to substitute a purine for a purine or a pyrimidine for a pyrimidine) but sometimes they are developed to satisfy mathematical properties. Some parameterised models are more complicated than setting two rates to be equal to each other, e.g. there are multiplicative constraints on matrix entries. In this paper, however, we will only be looking at models whose constraints are that some rates are equal to other rates.

The Lie Markov models (LMM) (Sumner et al. 2012; Fernández-Sánchez et al. 2015) are a set of parameterised DNA rate substitution models. Their construction is based on mathematical properties of matrices; each rate matrix model in this set forms a Lie algebra (note that a Lie algebra in this context can be defined as a matrix vector space which is closed under the operation [A,B]=AB-BA) as this guarantees that each transition matrix set is closed under matrix multiplication. In a study following this, Shore (2015) found that if a rate matrix set, Q, forms a matrix algebra (a matrix algebra we define as a matrix vector space which is closed under matrix multiplication, any matrix algebra is automatically a Lie algebra), the set of corresponding transition matrices is {I+Q:QQ, det(I+Q)0}. This makes finding the space of corresponding transition matrices a straightforward process compared to the usual practice of having to calculate matrix exponentials, which is notoriously computationally expensive (Moler and Van Loan 1978), although unfortunately this does not completely absolve the necessity of calculating matrix exponentials in practice. It is therefore advantageous for a rate matrix set to form a matrix algebra.

The study conducted by Shore et al. (2020) employed a method devised by Wills et al. (2015) of generating rate matrix sets from trees by labelling leaves on a rooted tree as the states and then defining the rate of change between two states to be the rate assigned to their most recent common ancestor. (Note that this method is explained in more detail in Sect. 2.) This method was used to test if certain biological mechanisms to distinguish amino acids could have developed in a serial manner (i.e. the specificity of a mechanism increased over time) and what properties of amino acids could have effected this development. To test this, the rooted trees were used to represent the increasing specificity of amino acid selection mechanisms rather than the evolution of a group of organisms.

Their methodology, which is now the focus of this work, was used to show that there is a link between properties of amino acids (namely, their polarity and the class in which their corresponding aaRS fall into) and the observed rates of change between amino acids as described in Le and Gascuel (2008). Given that this methodology has already been shown to correlate with biological mechanisms, it is now proposed that it be used to develop a suite of parameterised substitution models; particularly for amino acid substitution of which the most commonly used rate matrices are empirical. The family of rate matrix sets generated by this method has previously been unexplored, and we now aim to gain a mathematical understanding of these matrix sets.

In the present paper, we introduce a set of matrices associated with trees with rates associated to each interior vertex. In Sect. 3, we derive results on the multiplication of these matrices, and show, in the case that each rate is unique, that the matrices form a matrix algebra, which we refer to as a phylosymmetric algebra. In Sect. 5, we extend this result to completely characterise all conditions for which the matrices form a matrix algebra when two rates are identical, and derive sufficient conditions for simple cases of arbitrarily many equal rates.

Background

Definition 1

A rooted tree T on a set of taxa X is a connected, directed acyclic graph with no vertices of degree-2 other than the root, and whose leaves (degree-1 vertices) are bijectively labelled by the set X. The vertices other than the root and the leaves are referred to as internal vertices. Subtrees of T are denoted by T. The set of all rooted trees on a set of taxa X is denoted RP(X).

All trees in this paper are rooted trees and are permitted to be non-binary. We will henceforth refer to them as X-trees, or simply trees if there is no ambiguity.

If there is a directed edge from a vertex u to a vertex v, then we say that u is a parent of v and v is a child of u. If there is a directed path from u to v, then u is an ancestor of v and v is a descendant of u. In particular, a parent of a vertex v is always an ancestor of v, a child of v is always a descendant of v, and v is both an ancestor and descendant of itself. If two vertices u and v share a parent vertex, we say that u and v are siblings of each other.

Definition 2

A hierarchy H on a set X is a collection of subsets of X with the following properties:

  1. H contains both X and all singleton sets {x} for xX.

  2. If H1,H2H, then H1H2=, H1H2 or H2H1.

Definition 3

Let TRP(X) be a tree and v be a vertex of T. Then, the cluster of T associated with v is the subset of X consisting of the descendants of v in T.

A collection of subsets of X is a hierarchy if and only if it is the set of clusters of some rooted tree T taken over all vertices of T (see Steel 2016 for instance). For this reason, we refer to the set of clusters of T as the hierarchy of T, denoted H(T).

Suppose T is a tree with vertex set V and leaf set X={1,2,,n}V. For each pair of vertices ab we denote their most recent common ancestor as mrca(ab). Define a function ω:VR that assigns a real number to each vertex of the tree. For each vertex, uV, we call ω(u)=α the rate at u. Define the subset CαX×X where (x,y)Cα if and only if mrca(x,y)=u for all u with ω(u)=α. It follows that the set {Cα:αV} forms a partition of X×X.

To each Cα, we associate an n×n matrix Qα with off diagonal entries given by

(Qα)xy=1ifmrca(x,y)=u,0otherwise;

and diagonal entries

(Qα)xx=-#(z:(x,z)Cα).

We refer to Qα as the rate matrix associated with α. Note that when u is a leaf on T, the corresponding rate matrix Qα=0, and that matrices produced by the mrca function are symmetric. The set of mrca matrices produced by a single tree form the basis for a matrix algebra (see Theorem 8). Therefore, products in this space are symmetric, which implies that the algebra is commutative (see Lemma 1). The intent of this paper is to investigate the properties of the resulting set of matrix algebras.

Remark 1

It follows quickly from the definitions that

αω(V)Qα=J,

where J is the n×n matrix with 1 in each off diagonal entry and 1-n in each diagonal entry. In fact, for a tree with a unique rate at every vertex, if some non-leaf vertex u has m leaf descendants and we denote the set of all vertices that are descendants of some vertex u by Vu, we can see that

αω(Vu)Qα=Ju,

where Ju is the matrix

(Ju)ij=1ifijandi,jare descendants ofu,-mifi=j,and0otherwise.

Lemma 1

If the product of two symmetric matrices is also symmetric, then those two matrices commute (Leon 2010).

Proof

Let A, B and AB be symmetric matrices. Then, we have:

AB=(AB)T=BTAT=BA.

Example 1

We end this section by computing the rate matrix set associated with the tree in Fig. 1.

Fig. 1.

Fig. 1

A rooted tree on taxa X={1,2,3,4,5}, with all non-leaf vertices labelled by their rates

In this space, we have

Qα=-301110-311111-200110-201100-2,Qβ=-110001-1000000000000000000,Qγ=000000000000-211001-100010-1,Qδ=000000000000000000-110001-1,

and the matrix algebra is the set

βαααβαααααγγααγδααγδ:α,β,γ,δR

where is chosen to give zero row, and column, sum.

The Link to Graph Theory

We can also construct the matrix algebra corresponding to a tree T by considering a certain set of graphs associated with T that we will refer to as tree-induced graph sets (or TIGS). The basis elements of the matrix algebra will then be the Laplacian matrices of the associated TIGS.

Definition 4

Let GX be a set of graphs on vertex set X, where GX={G1=(X,E1),,G=(X,E)} with edge sets E1,,E disjoint, such that (X,Ei) is the complete graph on |X| vertices. Suppose each graph GiG is a disjoint union ZiCi where Zi is a set of degree-0 vertices and Ci is a complete k-partite graph for some k, and that without loss of generality that G1 contains no degree-0 vertices. Finally, given a graph Gi in G, suppose that for each part P of the k partitions in Ci that contain more than one element, there exists a unique graph Gj where V(Cj)=V(P). Then, we call G a tree-induced graph set (or TIGS).

This definition may seem opaque, so we provide an example to aid understanding. While the TIGS have been defined independently of trees, there is a very natural association between TIGS and trees, described in Theorem 1. We can therefore refer to a tree and its associated TIGS, with the intention of examining the TIGS using the Laplacian of each graph in the graph set.

Example 2

For example, consider the set of graphs depicted in Fig. 2. We can see that Gα is the only graph in the set that has no degree zero vertices. Further, Gα is a bipartite graph, with partitions P1={1,2} and P2={3,4,5}. We can then see that V(Gβ) corresponds to the partition P1, as Cβ=P1 and Zβ=X\P1, and that Cβ is bipartite with partitions {1} and {2}. Similarly, Gγ corresponds to the partition P2 of Gα, and Gγ is bipartite with partitions {3} and {4,5}. Finally, Gδ corresponds to the partition {4,5} of Gγ. As the only remaining partitions are singletons, the set {Gα,Gβ,Gγ,Gδ} is a TIGS.

Fig. 2.

Fig. 2

An example of a TIGS. Additionally, these graphs are the α-, β-, γ- and δ-mrca graphs of the tree in Fig. 1, as defined in Definition 5

Theorem 1

There exists a bijection between the set of hierarchies on X and the set of tree-induced graph sets on X.

Proof

For a cluster A in a hierarchy H(T) with inclusion-maximal subclusters A1,,A, we can define the graph G(A)=(V,E) where V=X and e=(v,w)E if and only if v and w are in the same inclusion-maximal subcluster Ai. This is the disjoint union of the complete graphs KAi. Let Z be the subset of V corresponding to X\A. Let φ be a function that maps A to G(A)Z, and let φC be the function that maps A to GC(A)Z, where GC denotes the complement of G (that is, the graph consisting of the same vertex set as G and an edge between vertices v and w if and only if there is not an edge between them in G).

Denote by ϕ the function that maps H(T) to the set {φC(A)AH(T)}. This is certainly injective, as φ and the operation of taking the complement on the subgraph induced by G(A) are both invertible. We therefore just need to show that the image of ϕ is precisely the set of TIGS.

Suppose we have some TIGS G={G1=(X,E1),,G=(X,Ek)}. Let GC={C1CZ1,,CkCZk}, where for Ci the complement is taken on the induced subgraph of Ci. Let Hi,j be the vertex set of the jth complete graph of Ci. We claim that H={X}S{Hi,ji{1,,},j{1,,k}} forms a hierarchy, where S is the set of singletons on X.

Recall that a hierarchy is a set of subsets of X that contains X, all singletons and the intersection between two subsets A and B is AB or empty. Certainly, H contains all singletons, and the intersection of any Hi,j with X is Hi,j, so it only remains to check that for any Hi1,j1,Hi2,j2 the intersection Hi1,j1Hi2,j2 is either empty or one of Hi1,j1 or Hi2,j2.

Suppose Hi1,j1Hi2,j2 is non-empty. The only way that this is possible is if V(Ci1) is a subset of one of the partitions of Ci2, or vice versa. But then, respectively, Hi1,j1Hi2,j2 or the reverse, so the intersection Hi1,j1Hi2,j2 is one of Hi1,j1 or Hi2,j2.

It follows that H is a hierarchy and therefore that the stated bijection exists.

Following the construction in Theorem 1, for each interior vertex of a tree, with rate α, we can associate a single graph.

Definition 5

Let T be a tree with associated mrca partition Cα. Let Gα be the graph (VE) where V=X and an edge e=(x,y)E if and only if ω(mrca(x,y))=α. Then, Gα(T) is referred to as the α-mrca graph of T.

Then, the set of mrca graphs of T is the corresponding tree-induced graph set as seen in Theorem 1. For example, the corresponding set of mrca graphs of the tree in Fig. 1 is shown in Fig. 2.

Recall the following standard graph-theoretic definitions.

Definition 6

Let G=(V,E) be a graph. Then, the adjacency matrix A(G) of G is the |V|×|V| matrix where

(A(G))vw=1if(v,w)E,0otherwise.

The degree matrix D(G) of G is the diagonal |V|×|V| matrix

(D(G))vw=deg(v)ifv=w,0otherwise.

Finally, the Laplacian matrix L(G) of G is the |V|×|V| matrix L(G)=D(G)-A(G). We simply write LDA if G is clear from context.

One can then see that the set of negative Laplacians of the associated mrca graphs of T correspond exactly to the basis elements of the matrix algebra.

Theorem 2

For any tree T, interior vertex u, and rate ω(u)=α, Qα=-L(Gα(T)).

In the next section, we will use the properties of the Laplacians of the associated mrca graphs to prove properties of the resulting matrix algebras.

Algebras Induced by Trees with Distinct Rates for each Vertex

We will now show that for a given tree, the set of rate matrices under matrix multiplication forms a matrix algebra.

Definition 7

A matrix algebra is a matrix vector space which is closed under matrix multiplication. A phylosymmetric algebra is a matrix set generated from a rooted tree using the previously described method. It always forms an commutative matrix algebra when the rates assigned to the non-leaf vertices are unique (see Theorem 8). We denote the matrix set generated from a tree T by QT.

In order to prove that the set of rate matrices under matrix multiplication for a given tree T forms a matrix algebra, it suffices to check that for each possible pair of rate matrices Qα,Qβ, the product QαQβ is a linear combination of rate matrices derived from T. To do this, we will need to be able to refer the relationship between different vertices of T.

Definition 8

For a tree T and two vertices on this tree u and v, we say that

  • u and v are comparable if either u is a descendant of v or the reverse.

  • u and v are incomparable if u is neither an ancestor nor a descendant of v.

We will also need to refer to different subtrees of T.

Definition 9

For a tree T which has an internal vertex u with rate ω(u)=α, we define

  • Tα as the subtree rooted at u;

  • Tβα as the subtree rooted at the child of u that is an ancestor of v.

Finally, we will need to appeal to some classical graph-theoretical results. Theorem 3 is folkloric and easily proven (see e.g. Brouwer and Haemers 2011, Proposition 1.3.1) and Theorem 4 can be proven in an almost identical way. We provide them here as they will be heavily used in the following work.

Theorem 3

Let G be a graph and A=A(G) its adjacency matrix. Then, (Ak)ij is the number of walks of length k on G from vertex i to vertex j.

Theorem 4

Let G1=(V,E1) and G2=(V,E2) be graphs on the same set of vertices and A1=A(G1),A2=A(G2) their corresponding adjacency matrices. Consider the multigraph G×=(V,E1E2). Then, (A1A2)ij is the number of walks of length 2 on G× from vertex i to vertex j, where the first edge is taken from E1 and the second from E2.

We are now in a position to investigate matrix multiplication of elements of QT, by appealing to the structure of the associated TIGS. We will consider squares of a rate matrix first.

Theorem 5

Let u be a vertex of a tree T so that ω(u)=α, and let Gα be an α-mrca graph, and Qα=-L(Gα)=Aα-Dα be the n×n matrix described before. Suppose Dα=diag(d1,...,dn). Then,

(Qα2)ij=di(di+1)ifi=j,-|Tα|ifiandjare in differentk-partitions ofGαdiifijare in the samek-partition ofGα.

Equivalently, if we denote the set of child vertices of u by Cu,

Qα2=(1-|Tα|)Qα+βω(Cu)(|Tα|-|Tβ|)γω(Vu)Qγ.

Proof

Since Qα=Aα-Dα, we know Qα2=Aα2-DαAα-AαDα+Dα2, and it suffices to consider each of these terms separately.

As Dα is a diagonal matrix, the last three terms are trivial to calculate. Certainly, Dα2=diag(d12,,dn2). Further,

(DαAα)ij=di(A)ij=0ifi,jare in the samek-partition ofGα,diotherwise,

and

(AαDα)ij=dj(A)ij=0ifi,jare in the samek-partition ofGα,djotherwise..

Now, by Theorem 1, we can consider the associated TIGS graph (and in particular Gα), and by Theorem 3, (Aα2)ij is the number of walks of length 2 from i to j in Gα. As Gα is the complete k-partite graph for k the number of partitions, if ij are in the same partition, this is simply the number of vertices of Gα not in this partition, so di. If they are in different partitions, this is the number of vertices that are in neither the partition containing i nor the one containing j. If we denote the partition containing i by P(i) and similarly for j, this is |Tα|-|P(i)|-|P(j)|=di+dj-|Tα|, since |P(i)|=|Tα|-di and |P(j)|=|Tα|-dj.

To summarise,

(Aα2)ij=diifi,jare in the samek-partition ofGαdi+dj-|Tα|otherwise.

Since Qα2=Aα2-DαAα-AαDα+Dα2, we therefore obtain

(Qα2)ij=di(di+1)ifi=j,-|Tα|ifiandjare in differentk-partitions ofGαdiifijare in the samek-partition ofGα.

as required.

Finally, equivalence of the two expressions in the statement of the theorem follows simply by observing the entries of the matrix and applying Remark 1.

We will now consider multiplication of two rate matrices associated to comparable vertices.

Theorem 6

Let u and v be vertices of a tree T so that ω(u)=α,ω(v)=β. Let Gα,Gβ be α- and β-mrca graphs, and Qα=-L(Gα)=Aα-Dα and Qβ=-L(Gβ)=Aβ-Dβ be the n×n matrices described before. Finally, suppose that v is a descendant of u. Then,

QαQβ=(|Tβα|-|Tα|)Qβ=QβQα.

Proof

Suppose Dα=diag(c1,,cn) and Dβ=diag(d1,,dn). Further let Aα=(aij) and Aβ=(bij).

Since QαQβ=(Aα-Dα)(Aβ-Dβ), we know QαQβ=AαAβ-AβDα-AαDβ+DαDβ, and it suffices to consider each of these terms separately.

We first consider DαDβ. As v is a descendant of u, any vertex i of Gβ with nonzero degree is a subset of a single k-partition of Gα. In particular, as Gα is a complete k-partite graph ci=|Tα|-|Tβα| so it follows

(DαDβ)ij=(|Tα|-|Tβα|)diifi=jandiis a descendant ofv,0otherwise.

Therefore, (DαDβ)=(|Tα|-|Tβα|)Dβ.

We now consider AβDα. Let (Aβ)ij=bij. As Dα is diagonal, (AβDα)ij=bijci. In particular, bij is nonzero (in fact 1) if and only if ij are both descendants of v and i and j are in different partitions of Gβ. For all such ij, we see i and j are in the same partition of Gα, so again ci=|Tα|-|Tβα|. Hence,

(AβDα)ij=|Tα|-|Tβα|ifi,jare descendants ofvand in separate partitions ofGβ,0otherwise.

Therefore, (AβDα)=(|Tα|-|Tβα|)Aβ.

We now consider AαDβ. Let (Aα)ij=aij. As Dβ is diagonal, (DαAβ)ij=djaij. In this case, dj is nonzero if and only if j is a descendant of v. But we know all descendants of v are in the same k-partition of Gα, so it follows that

(AαDβ)ij=djifjis a descendant ofvandiis a descendant ofubut notv,0otherwise.

Finally, we consider AαAβ. By Theorem 1, we can consider the associated TIGS graph of T (and in particular Gα and Gβ), and by Theorem 4, this says that if Gα=(V,E1),Gβ=(V,E2), then by taking the multigraph G×=(V,E1E2), (AαAβ)ij is the number of walks of length 2 on G× from vertex i to vertex j, where the first edge e1 is taken from E1 and the second edge e2 from E2. We consider e2 first. This is an edge from leaf k in a partition of Gβ that does not contain j to j itself, of which there are deg(j)=dj such edges. It follows that, if it exists, e1 is an edge in Gα from the vertex i (which is not a descendant of v) to k, of which there is only one. Thus

(AαAβ)ij=djifjis a descendant ofvandiis a descendant ofubut notv,0otherwise,

which means AαAβ=AαDβ.

It follows that

QαQβ=AαAβ-AβDα-AαDβ+DαDβ=DαDβ-AβDα=(|Tα|-|Tβα|)Dβ-(|Tα|-|Tβα|)Aβ=(|Tα|-|Tβα|)(Dβ-Aβ)=(|Tβα|-|Tα|)Qβ

as required.

To complete the proof, we see that QαQβ=QβQα, as Qα and Qβ are symmetric matrices, and their product is a scalar multiple of a symmetric matrix and hence symmetric itself, so by Lemma 1, we know that Qα and Qβ commute.

Finally, we consider multiplication of two rate matrices associated with incomparable vertices.

Theorem 7

Suppose that u and v are incomparable vertices so that ω(u)=α and ω(v)=β. Let Gα,Gβ be α- and β-mrca graphs, and Qα=Aα-Dα and Qβ=Aβ-Dβ be the n×n matrices described before. Then,

QαQβ=0n×n.

Proof

By Theorem 1, we can consider the associated TIGS graph (and in particular Gα and Gβ), and as u and v are incomparable, Gα and Gβ can have their vertices partitioned into disjoint sets A and B, where Gα only has edges between vertices in A, and Gβ only has edges between vertices in B.

It therefore suffices to observe that under an appropriate choice of basis, the Laplacian matrix of each graph is block diagonal, where all nonzero blocks of Qα correspond to zero blocks of Qβ, and vice versa. It follows that

QαQβ=0n×n.

Theorem 8

For a binary rooted tree T, QT is an commutative matrix algebra.

Proof

We know that QT is a vector space, closed under matrix products (see Theorems 57) and that all matrices in QT and their products are symmetric, so the space is commutative by Lemma 1.

Algebras Induced by Trees with Repeated Rates

So far we have found that when the rates assigned to tree nodes are unique, the matrix set forms an algebra. Now, we explore cases of rates not being unique. We note here that the K2P model is an example of a phylosymmetric algebra with non-unique rates. We see that the tree represented in Fig. 3 gives rise to the K2P model. We know from previous work (Fernández-Sánchez et al. 2015) that the matrix set for K2P is closed under matrix multiplication. However, in the general case, there is no guarantee that a matrix set will still be closed under matrix multiplication when several rates on the tree are set to be equal. It should be noted here that for all cases in which two or more rates are set to be equal, the matrix algebra generated from the same tree with unique rates will always be a commuting matrix algebra which contains the set of rate matrices generated from the tree which contains repeated rates. (This matrix algebra, however, would not honour the constraint of the rates being equal.) We now explore the conditions that have to be met on such a rooted tree for its rate matrix set to be an algebra.

Fig. 3.

Fig. 3

A rooted tree on states of DNA with taxa X={ A, G, C, T }, with all non-leaf vertices labelled by their rates. The phylosymmetric algebra that this tree gives rise to is the K2P model

Definition 10

Let T be a tree with at least two non-leaf vertices u and v, so that ω(u)=α and ω(v)=β. Let T be a tree with the same topological tree structure and associated rates as T, with the additional constraint that α=β. (Here, we suppose that there are only two rates on T that are equal.) We note that if QT= span{Qα,Qβ,Qγ,Qδ,}R and we define QX=Qα+Qβ, then we have QT= span{QX,Qγ,Qδ,}R. If QT is a matrix algebra, we say that α=β is a phylo-algebraic constraint.

Labelling two vertices by the same rate is equivalent to adding their rate matrices, so we can consider

(Qα+Qβ)2=Qα2+Qβ2+2QαQβ,

as QαQβ=QβQα by Lemma 1 and Theorem 6.

If u is an ancestor of v, then by Lemma 5 this becomes

Qα2+Qβ2+2(|Tα|-|Tβ|)Qβ,

and in the particular case that they are incomparable, by Theorem 7 we obtain

Qα2+Qβ2.

Theorem 9

If T is a tree and u and v are siblings so that ω(u)=α and ω(v)=β, and u and v have the same number of leaf descendants, α=β is a phylo-algebraic constraint (and hence the resultant matrix algebra is closed).

Proof

Suppose u and v are siblings, and have the same number of leaf descendants (i.e. |Tα|=|Tβ|). Then, by Theorem 5,

Qα2+Qβ2=-|Tα|(Qα+Qβ)+scalar multiples of the rate matrices of their descendants,

which is certainly within the generated matrix set. As u and v are siblings, then for any third vertex w with rate γ, w is an ancestor to both of them, incomparable to both of them, or incomparable to one and a descendant of the other.

If w is an ancestor of both u and v, then (Qα+Qβ)Qγ=(|Tγ|-|Tβ|)(Qα+Qβ). If w is incomparable to both, (Qα+Qβ)Qγ=0n×n. If, w is, say, incomparable to u and a descendant of v, then (Qα+Qβ)Qγ=(|Tα|-|Tγ|)Qγ. This covers all possible cases, as u and v are siblings.

In all three cases, the result is clearly in the algebra, so we will always obtain a phylosymmetric algebra.

Theorem 10

If T is a tree, u and v are interior vertices such that ω(u)=α and ω(v)=β, and one of u and v is the parent of the other, α=β is a phylo-algebraic constraint

Proof

Suppose without loss of generality, u is the parent of v. We first consider the tree T without the α=β constraint. Using Theorem 1, we can consider the associated TIGS, in particular Gα and Gβ. Suppose Gα be a complete k-partite graph and Gβ be a complete k-partite graph. In this case, we can see that the only change induced to the corresponding TIGS by the α=β constraint is that Gα and Gβ are removed and replaced with Gα+Gβ, where + indicates a graph sum. Then, the resulting mrca graph set is certainly a TIGS, as we can partition Gα+Gβ into a complete (k+k-1)-partite graph, by applying the k-partition of Gα and subpartition the partition consisting of the descendants of v into the k parts corresponding to Gβ.

The resultant TIGS therefore corresponds to a tree by Theorem 1, and therefore by Theorem 8 forms a matrix algebra.

Observation

The set of basis matrices obtained in the case of Lemma 10 coincides exactly with the set of basis matrices of the tree in which the vertices u and v are identified in the graph theoretic sense. Let T be a tree in which there is a union Ci of connected subgraphs of T where each connected subgraph Ci has all rates identified with each other, but not any other connected subgraph Cj. Then this will also induce a matrix algebra (indeed a phylosymmetric algebra), as we can sequentially identify parent–child pairs, obtain a matrix algebra corresponding to a tree and then identify another parent–child pair.

Theorem 11

Let T be a tree with unique rates and QT be the phylosymmetric algebra of T. If u and v are interior vertices so that ω(u)=α and ω(v)=β, we define QTα=β as the matrix set generated from setting α=β. QTα=β is a matrix algebra if and only if one of the following is true:

  1. u is a parent of v or vice versa; 

  2. u and v are siblings and have the same number of leaf descendants.

Proof

For an added constraint α=β, we let QX=Qα+Qβ. We can show that QTα=β is not a matrix algebra by showing that products in the space cannot be written as linear combinations that include QX but do not include Qα and Qβ.

First, we assume that QTα=β is a matrix algebra. There are five possible ways to describe the positions of two vertices u and v on a tree:

  1. There exists a vertex w such that w is a descendant of u and an ancestor of v.

  2. There exists a vertex w such that u and w are incomparable and v is a descendant of w.

  3. There exists a vertex w with rate γ such that u and v are child vertices of w and |Tα||Tβ|.

  4. There exists a vertex w with rate γ such that u and v are child vertices of w and |Tα|=|Tβ|.

  5. The vertex u is a parent of v or vice versa.

In Case 1, we see that

QγQX=Qγ(Qα+Qβ)=QγQα+QγQβ=-n1Qγ-n2Qβ(Theorem 6 whereniN),

as n1n2, therefore α=β is not a phylo-algebraic constraint and QTα=β is not a matrix algebra.

For Case 2, we let u and w be incomparable and v be a descendant of w. We then have

QγQX=Qγ(Qα+Qβ)=QγQα+QγQβ=(|Tγ|-|Tβ|)Qβ.

As this set of matrices are linearly independent, any scalar multiple of Qβ is not able to be generated by the set, and so this product is not contained within the space.

In Case 3, if we denote the set of child vertices of w by Cw,

Qγ2=(1-|Tγ|)Qγ+δω(Cw)(|Tγ|-|Tδ|)ϵω(Vw)Qϵ=(|Tγ|-|Tα|)Qα+(|Tγ|-|Tβ|)Qβ+other matrix terms linearly independent ofQαandQβ.

As we know that |Tα||Tβ|, we can see that under these circumstances, QTα=β is not a matrix algebra.

So we see that only cases 4 and 5 remain, and both produce matrix algebras by Lemmas 9 and 10 respectively.

The theorem follows.

Discussion

In Sect. 2, we introduced a set of matrices associated with trees that had rates associated to each non-leaf vertex. In Sect. 4, we derived results on the multiplication of these matrices, and showed, in the case that each rate is unique, that the matrices form a matrix algebra. In Sect. 5, we extended this result to completely characterise all conditions for which the matrices form a matrix algebra when two rates are identical, and derived sufficient conditions for simple cases of arbitrarily many equal rates.

In previous work, it has been found that building phylogenetic models with a focus on mathematical, rather than biological, properties can produce models which are computationally faster to use and can address biological problems that had not previously been considered (Sumner et al. 2012; Sumner 2017; Shore 2015). Development of phylogenetic models also presents new applications of, and new problems in, linear algebra, graph theory and other areas of mathematics (Steel 2016). Phylosymmetric algebras are an application of both linear algebra and graph theory in phylogenetics which has previously been unexplored. We hope that future research in this area will provide similarly valuable results. In particular, future work could characterise all conditions for which a tree with a given set of associated rates form a matrix algebra. In addition, a characterisation of which matrix algebras are induced by trees would also be interesting and may lead to a better structural understanding of rooted trees.

Another avenue of possible research from this point is development of phylogenetic models. We have shown that phylosymmetric algebras have desirable mathematical properties. Sumner et al. (2012) and Shore (2015) have shown that such mathematical properties are desirable in rate substitution models. To use these algebras for rate substitution models in DNA would not provide much in the way of new ground given the broad literature of DNA rate substitution models (Fernández-Sánchez et al. 2015 for example provides a list of all parameterised DNA models with purine/pyrimidine symmetry which are closed under multiplication). Although, as discussed in Sect. 5, we note that the K2P model is an example of a phylosymmetric algebra.

In amino acid substitution models, however, empirical models are most commonly used (Le and Gascuel 2008 for example) with very few parameterised models having been developed as utilised. The current parameterised amino acid substitution models (Yang et al. 1998; Adachi and Hasegawa 1996) have between 24 and 190 parameters and are not constructed with desirable mathematical properties. To fill this gap, our method of rate matrix construction could be used to build a suite of parameterised amino acid substitution matrices with between 3 and 19 parameters. Having a smaller number of parameters makes computations faster (and hence more computational power can be dedicated to checking the robustness of results) (Mello et al. 2016) and makes the process of interpreting the fitted parameters a much simpler task.

This proposed method of amino acid substitution matrix generation is distinct from all existing amino acid substitution matrices as our proposed approach features a set of parameterised matrices with a low number of parameters. These models have desirable mathematical properties and, given we can build the initial trees with splits that represent characteristics of amino acids such as polarity, the parameters convey biological significance. As well as such models being mathematically tractable, they have also already been shown to have real biological applications and correlate with biological data as shown by Shore et al. (2020).

Acknowledgements

MH thanks the Volkswagen Foundation 93_046 Grant for support during research at HHU and the Australian Postgraduate Award for support during research at WSU. JS thanks her Australian Research Training Program scholarship for support during research.

Funding

Funding Open Access funding enabled and organized by Projekt DEAL.

Footnotes

Substantial parts of MH’s research were carried out at both WSU and HHU.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  1. Adachi J, Hasegawa M. Model of amino acid substitution in proteins encoded by mitochondrial DNA. J Mol Evol. 1996;42(4):459–468. doi: 10.1007/BF02498640. [DOI] [PubMed] [Google Scholar]
  2. Brouwer AE, Haemers WH. Spectra of graphs. New York: Springer; 2011. [Google Scholar]
  3. Fernández-Sánchez J, Sumner JG, Jarvis PD, Woodhams MD. Lie Markov models with purine/pyrimidine symmetry. J Math Biol. 2015;70(4):855–891. doi: 10.1007/s00285-014-0773-z. [DOI] [PubMed] [Google Scholar]
  4. Kimura M. A simple method for estimating evolutionary rates of base substitutions through comparative studies of nucleotide sequences. J Mol Evol. 1980;16(2):111–120. doi: 10.1007/BF01731581. [DOI] [PubMed] [Google Scholar]
  5. Le SQ, Gascuel O. An improved general amino acid replacement matrix. Mol Biol Evol. 2008;25(7):1307–1320. doi: 10.1093/molbev/msn067. [DOI] [PubMed] [Google Scholar]
  6. Leon SJ. Linear algebra with applications. 8. London: Pearson; 2010. [Google Scholar]
  7. Mello B, Tao Q, Tamura K, Kumar S. Fast and accurate estimates of divergence times from big data. Mol Biol Evol. 2016;34(1):45–50. doi: 10.1093/molbev/msw247. [DOI] [PubMed] [Google Scholar]
  8. Moler C, Van Loan C. Nineteen dubious ways to compute the exponential of a matrix. SIAM Rev. 1978;20(4):801–836. doi: 10.1137/1020098. [DOI] [Google Scholar]
  9. Shore JA (2015) Lie Markov models and DNA evolution. Honour’s thesis, University of Tasmania
  10. Shore JA, Holland BR, Sumner JG, Nieselt K, Wills PR (2020) The ancient operational code is embedded in the amino acid substitution matrix and aaRS phylogenies. J Mol Evol [DOI] [PubMed]
  11. Steel M. Phylogeny. Philadelphia: SIAM; 2016. [Google Scholar]
  12. Sumner JG. Multiplicatively closed Markov models must form Lie algebras. ANZIAM J. 2017;59(2):240–246. doi: 10.1017/S1446181117000359. [DOI] [Google Scholar]
  13. Sumner JG, Fernández-Sánchez J, Jarvis PD. Lie Markov models. J Theor Biol. 2012;298:16–31. doi: 10.1016/j.jtbi.2011.12.017. [DOI] [PubMed] [Google Scholar]
  14. Wills PR, Nieselt K, McCaskill JS. Emergence of coding and its specificity as a physico-informatic problem. Orig Life Evol Biosph. 2015;45(1–2):249–255. doi: 10.1007/s11084-015-9434-5. [DOI] [PubMed] [Google Scholar]
  15. Yang Z. Molecular evolution: a statistical approach. London: Oxford University Press; 2014. [Google Scholar]
  16. Yang Z, Nielsen R, Hasegawa M. Models of amino acid substitution and applications to mitochondrial protein evolution. Mol Biol Evol. 1998;15(12):1600–1611. doi: 10.1093/oxfordjournals.molbev.a025888. [DOI] [PubMed] [Google Scholar]

Articles from Bulletin of Mathematical Biology are provided here courtesy of Springer

RESOURCES