BACKGROUND
the increasing availability of pathway information enables the comparative analyses of organisms at the functional level.
as the basis for such studies we propose to use pathway alignment, an effective technique that provides both a similarity score as well as a clear indication of specific differences between pathways.
the score can be used as yet another type of data with which to build dissimilarity-based phylogenies, but - in addition - the alignment details allow in-depth analysis of the evolutionary changes that various pathways underwent.
thus, our method allows a systematic examination of evolutionary relationships among species using their functional traits, based on a description of their entire metabolic processes rather than an individual element as in conventional analysis.
in addition, such studies allow us both to further improve pathway alignment techniques by finding more faithful similarity scores, as well as to study co-evolution of metabolic pathways.
specifically, there is currently a significant amount of metabolic pathways data residing in public and proprietary databases such as kegg  <cit> , metacyc  <cit> , ipath  <cit>  and biocarta  <cit> .
the various databases have mostly overlapping data; however, the pathways of many organisms appear only in some of the databases, or appear in all or some of them but with different constituent enzymes and morphology.
nevertheless, this data is rich enough to be used in order to determine similarity in a large set of species and pathways.
a single analogous pathway can be used as the basis for generating a similarity matrix between a set of species , and then build a phylogenetic tree that reflects the evolutionary history based on this pathway alone.
one pathway, however, does not tell the whole story.
the first algorithm that we propose here looks at all the known pathways in a set of organisms and combines their similarity scores in a systematic fashion to produce a more comprehensive picture; an entropy-like weight determines the information contents of each individual pathway when computing the combined similarity score between organisms.
furthermore, pathways interact functionally with each other; these interactions can be reflected in their evolution.
our second algorithm is a novel approach for studying the co-evolution of metabolic pathways.
our method detects pathways whose evolution is correlative both in terms of changes in their topology and in terms of changes in their enzymatic content.
the application of our algorithms enabled us to draw some specific conclusions about the usability of pathway information.
moreover, we were able to make observations about the evolutionary relationships between certain families of organisms and shed light on their proper classification.
for example, we were able to resolve evolutionary relationships among different archaeal species based on their metabolic pathways.
furthermore, unique properties common to both thermophilic crenarchaea and euryarchaea were detected.
additionally, we used our approach to study co-evolution of metabolic pathways.
we discovered that the analyzed pathways can be clustered into two groups according to their evolution.
this result may imply that there are strong functional relations between pathways that are part of the same cluster.
previous work
both the algorithm for inferring phylogeny from metabolic pathways and the algorithm for studying co-evolution of metabolic pathways are based on the alignment of metabolic pathways  <cit> .
there has been considerable work on the alignment of pathways and networks  <cit>  and most methods provide some kind of a similarity score; we refer the reader to  <cit>  for a recent review.
dandekar et al.
<cit>  presented one of the earliest efforts introducing comparative analysis of metabolic pathways, combining three methods of comparing biochemical pathways: analysis and comparison of biochemical data, analysis based on elementary modes, and comparative genome analysis.
among other results, it showed high plasticity in the glycolysis pathway.
clemente et al.
<cit>  used metabolic pathway comparison to show that vital biological processes in a group of related species are usually expressed by a number of highly conserved reactions.
furthermore, they show that it is unlikely for a group of reactions to be completely missing form one of the organisms in a set of similar species.
there has also been growing interest in the reconstruction of phylogenetic trees from the abovementioned comparison results  <cit>  in recent years.
heymans and singh  <cit>  presented a technique for the phylogenetic analysis of metabolic pathways based on the topology of the underlying graphs.
they defined a distance measure between graphs using the similarity between nodes of the graphs .
this distance measure was applied to the enzyme-enzyme relational graphs derived from metabolic pathways and the resulting distance matrix was used to obtain a phylogenetic tree.
in a later work by clemente et al.
<cit> , a software tool that uses metabolic pathway comparison to create phylogenetic trees is presented; the comparison method used here is pseudo-alignment, i.e., mapping each reaction in one pathway to another reaction or a group of reactions in the other.
this tool, however, covers only a limited number of organisms and pathways for which a phylogenetic tree can be built.
hong et al.
<cit>  presented a method for constructing a phylogenetic tree based on metabolic data deduced from genomic sequences.
this method accounts for horizontal gene transfer and specific gene loss by comparing whole metabolic subpathways, and allows evaluation of evolutionary relatedness and changes in metabolic pathways.
another work in this area is by chor and tuller  <cit> .
they create phylogenetic trees based on distances between metabolic networks of different species.
the distance measure they use is based on the relative description length  of the networks, i.e.
the number of bits needed to describe one network given the other.
this method is more efficient when dealing with large metabolic networks than most other known comparison methods.
still, to the best of our knowledge, to date  no one has used a score that reflects both the pathway structure as well as the identity of the enzymes in such studies and no systematic handling of all pathways in many organisms has been offered.
finally, previous works showed that proteins with similar functionality  <cit>  that physically interact  <cit> , or that are close to each other in a metabolic network  <cit> , tend to have similar evolution.
however, to the best of our knowledge, no previous work analyzed co-evolution of metabolic pathways by a measure that considers both the enzymes in the pathways and its topology.
here we perform for the first time a complete computational comparison of organisms based on all the available metabolic pathways that describe their function, taking into account both enzyme contents as well as pathway topology, and accounting for differences in functionality that is reflected in missing pathways.
furthermore, we deduce the co-evolution of pathways in different organisms based on the same data.
our results reveal a few novel and biologically significant observations.
methods
pathway alignment and data organization
most pathway databases and repositories   <cit> , to align the two instances against each other, producing  two similarity scores.
when looking at a set of n organisms, we can arrange the results of an all-against-all comparison of the organisms for a specific pathway in an n × n matrix a, where aij is the similarity score of aligning the pathway as it appears in organism i with its analogous occurrence in organism j.
each such  <dig> dimensional array is called a page , and in itself it constitutes a similarity matrix that can be used for building a phylogeny.
a single pathway, however, is not a good enough basis for deriving meaningful phylogenies .
rather, we are interested in a global picture based on all the available pathways.
thus, we create a page for each of the m pathways in the database; then, the resulting pages are organized in an n × n × m  <dig> dimensional  array, a, where each page is indexed by the corresponding pathway ; now aijk is the similarity score for comparing pathway k as it appears in organisms i and j. note that since some pathways do not exist for some of the organisms , the sizes of the pages might not be commensurate with each other; to accommodate for this phenomenon and to obtain a regular n × n × m 3d array we stretch the pages to be the same size, denoting missing entries appropriately .
interpreting and weighting the data
analyzing these data in order to obtain insights about the evolutionary history of the organisms was performed as follows: we collapse the 3d array into a 2-dimensional similarity matrix by combining the m entries in each column into one scalar entry; this matrix would serve us as a distance matrix in order to build a phylogenetic tree using known algorithms.
the first step in the process of combining a column's entries is setting a threshold that describes scores as relevant: all similarity scores below this threshold  will not contribute to the values in the similarity matrix, and all similarity scores above it will contribute to them equally.
using this method - on one hand - causes some loss of information, but - on the other hand - enables combining the data in an effective manner while also handling the issue of missing entries that will be discussed in more detail later in this section.
for each page we create a threshold graph  in the following manner: define a node v ∈ v for each organism; two such nodes are connected by a directed edge e ∈ e if their similarity score is higher than the given threshold.
using  we calculate w, an assessed weight for each tg:
this weight, inspired by  shannon's entropy  <cit> , reflects the amount of information in the page.
this formula gives scores ≥ <dig> to each graph, based on the degrees of all its nodes.
a graph will have w =  <dig> if the degrees of all nodes in the graph are  <dig>  since the  part of the formula will be  <dig> for each node.
alternatively, w =  <dig> if all node degrees are |v|, in which case the  will be equal to  <dig> for all nodes.
in the first case, the organisms are all different from one another and there is nothing to learn about their similarity.
in the latter, each organism is "very similar" to all the other organisms, which can teach us nothing new about the whole group.
each edge in the tg is given a weight according to this formula.
the 3d array is modified by replacing aijk by  <dig> if nodes i and j are not joined by an edge in the tg corresponding to pathway k, and by the calculated weight w if an edge exists between organisms i and j in the tg.
in fact, each page is now the adjacency matrix of the weighted tg.
this technique also solves the problem of missing entries, as follows: for the cases where a pathway exists in one of the organisms but does not in the other, we decided never to connect the two organisms with an edge in the tg, and as a result the corresponding entry in the array will always be  <dig>  to accommodate the cases where the pathway is missing in both organisms, we added a new global, boolean parameter b: if b is true then each such two organisms will be joined by an edge, otherwise such edges will not be formed.
intuitively, if the confidence in the data is high then b should be assigned true, since in this case the absence of a pathway in both organisms tells us that they are similar in their lacking.
if our confidence in the data is low, b should be assigned false since in this case the pathway could be missing due to lack of data, and this might not indicate a real similarity.
naturally, using a threshold in forming the tg resulted in loss of information.
however, we found that the advantage of being able to include missing entries is far more significant to our results than the information lost by not using the actual alignment score.
furthermore, by adjusting the threshold value, we can make sure that our results are as precise as possible.
after dealing with this issue we can safely add all the similarity scores in each vector along the pathway axis and thus create a 2-dimensional similarity matrix.
building phylogenetic trees
the resulting 2d matrix is turned into a dissimilarity matrix so that it can be used as input to an algorithm for building phylogenetic trees, e.g.
the neighbor-joining algorithm  <cit> , as embodied in e.g.
the phylip  <cit>  package, as follows: each element in the matrix is subtracted from the maximum element in it; recall that this element must appear along the main diagonal since each organism obtains a perfect similarity score when aligned with itself.
finally, it is possible to identify the contribution of specific pathways to the resulting phylogeny: one can trace differences among phylogenetic trees back to the pathways that cause them in order to understand their biological reason; furthermore, the alignments produced by the mph algorithm can be used to further elucidate these differences.
moreover, we can study the pathways whose tgs got the highest weights to see if they induce an interesting classification of the organisms into groups.
the computational pipeline for inferring a phylogenetic tree based on metabolic pathways
the pseudo-code for the computational pipeline is given here:
input:   n: number of organisms
m: number of pathways
p: matrix n*m. entry pij is the instance of pathway j in organism i
d: deletion score for mph
t: threshold
b: boolean parameter to determine whether a pathway missing in two organisms is considered over  or under  the threshold
output: tree: a phylogenetic tree
for k :=  <dig> .m do
for i, j :=  <dig> .n do
if exists pik and exists pjk then
if size of pik < pjk then aijk := mph;
else aijk := mph;
elsif not exists pik and not exists pjk then aijk := both missing;
else aijk := one missing;
build graph tg s. t.
v := { <dig> .n};
e := { | aijk ≥ t}; //only numeric values
if b then e := e ∪ { | aijk = both missing};
;
for i, j :=  <dig> .n do
if  ∈ e then aijk := w);
else aijk := 0;
for i, j :=  <dig> .n do
simmatij := ;
dissimmat := simmat11* <dig> - simmat;
tree := neighbourjoining;
the time complexity of this algorithm is o, which is dominated by the time needed to read the entries of the input array, assuming that m >>n.
data sources
our algorithm was applied to data that was obtained from the metacyc repository  <cit> .
we chose this database since it is very rich in data and it is organized in a way that best suits our requirements, i.e., it contains one variation of each pathway for all the organisms for which it is known.
initially we used over  <dig> metabolic pathways for the  <dig> organisms that were retrieved from this database .
this presented a significant computational challenge, namely making over  <dig> million individual pathway alignments.
fortunately, this problem is "embarrassingly parallel", i.e.
each alignment can be run separately, and thus we were able to solve it using a computational grid facility.
studying co-evolution of metabolic pathways
for comparing the evolution of different metabolic pathways the following steps were performed.
first, a distance matrix  was computed for each pathway .
next, all the pages were compared to each other, one pair at a time.
to this end, we considered both the fact that a pathway may appear only in part of the organisms and that in cases that a pathway appears in a pair of organisms its structure in the two organisms may be different .
thus, the distance measure between a pair of matrices includes two components: one is the generalized hamming distance that 'captures' similar/non-similar appearances in the same organism, h. this can be further explained as follows: let d <dig> denote the value of an entry in the distance matrix corresponding to a case where a pathway does not appear in the two organisms; let d <dig> denote the value of an entry in the distance matrix corresponding to a case where a pathway appears in the two organisms; let d <dig> denote the value of an entry in the distance matrix corresponding to a case where a pathway appears in the first organism but not in the second one; and let d <dig> denote the value of an entry in the distance matrix corresponding to a case where a pathway appears in the second organism but not in the first one.
let d denote the contribution to the generalized hamming distance due to value xin a certain entry in the page of one pathway and y in the same entry in the page of the second pathway.
we used ∀xd = 0;
d = d =  <dig>  d = d = d = d =  <dig>  and d = d = d = d =  <dig>
the final score was normalized by dividing it by the number of entries in a page.
the second component, l, considers only entries where both pathways appear in both organisms and it is the l <dig> distance between the vectors that are composed of these entries in the two organisms.
the final distance is a weighted average of the two distances, computed as in .
as the first component of the score reflected a rougher distance measure we used wp = 100; however, the result was robust to small changes in wp.
based on this measure we generated a distance matrix between pathways that can be further analyzed as described in the next section .
RESULTS
analysis of the entire dataset of metacyc
the version of metacyc that was used in this work includes  <dig> pathways and  <dig> organisms.
using a computational grid comprising  <dig> nodes we were able to analyze the entire dataset, i.e.
to perform more than  <dig> million individual pathway alignments in just a few days.
evolutionary trees based on the entire dataset were very noisy.
the main reason for this result is the fact that the data in most of the pathways/organisms are very partial.
for example, the mean size  of  <dig> of the pathways over the organisms that appear in the dataset is less than  <dig>  on the other hand, the size of the pathway with the top mean size is  <dig>  thus, as specific biological examples  we chose less biased subsets of organisms and pathways.
an example: a phylogenetic tree of archaea based on metabolic pathways
as a specific biological example we performed a deep biological analysis of all the archaea that appear in metacyc based on their metabolic pathways.
we chose this dataset for two main reasons.
first, this dataset is less biased since the size of the metabolic network of all archaea in metacyc is relatively similar .
second, as the archaea live in extreme and diverse environments it is interesting to compare the changes in their metabolic networks to their phylogeny.
a phylogenetic tree that was produced by running the algorithm is displayed in figure 2a and was compared to the ncbi reference tree .
note that even though the two trees are differently structured, the basic topology is very similar, i.e.
the resulting tree is well separated into methanogens , halophiles, and thermophiles and archaeoglobus fulgidus is farthest from the rest of the organisms.
the differences between these two trees are interesting and usually can be explained: the hyperthermophilic a. fulgidus also falls close to the methanogens.
this can be explained by the fact that a. fulgidus represents an evolutionary transitional type of organism among the archaea: it is a hyperthermophile and yet is known to be related to methanogens  <cit> .
for example, a. fulgidus contains acetyl-coa decarbonylase/synthase , a multienzyme complex catalyzing the reversible cleavage and synthesis of acetyl-coa in methanogens  <cit> .
a. fulgidus is an example of an organism that contains a functional acds complex and is not a methanogen.
furthermore, thermophilic archaea are clustered together .
this implies the existence of unique pathways that are found only in thermophiles.
anaerobic respiration, tca cycle, and tryptophan biosynthesis pathways in metacyc were found to include specific variations unique to thermophiles while chorismate biosynthesis, formaldehyde assimilation, threonine biosynthesis, and valine biosynthesis pathways were missing from thermophiles in the metacyc dataset.
for example, in the chorismate pathway it is known that many archaea do have a distinct shikimate kinase  <cit> .
in addition, a new pathway  for the generation of pentoses needed for the chorismate pathway was recently found in thermophilic archaea  <cit> .
another interesting discrepancy between the two trees is the clustering of methanosarcina mazei with halobacteriaceae in the tree that is based on metabolism.
this result can be explained by the fact that methanosarcina mazei is a freshwater organism that can adapt to grow at elevated salinities  <cit> .
thus, its metabolism resembles the metabolism of halobacteriaceae that are found in water saturated or nearly saturated with salt.
still, there are some unresolved discrepancies between the two trees.
one unresolved issue is the intermix of the thermophilic crenarchaea and the thermophilic euryarchaea in the thermophilic cluster.
specifically, why are the thermophilic crenarchaea divided in the tree shown in figure 2a?
why is pyrococcus horikoshii linked to them whereas the crenarchaeote sofolobus solfataricus is grouped with the euryarchaeotes pyrococcus furiosus, thermoplasma acidophilum, and thermoplasma volcanium?
this may be either a result of a curation error in the metacyc database or it may suggest that the metabolism of thermophilic crenarchaea and the thermophilic euryarchaea is not significantly different.
we encourage an additional future research on this issue.
co-evolution of metabolic pathways
we examined our approach for detecting co-evolution of pathways on a subset of the available pathways that are known to be shared by many organisms such as amino acids biosynthesis and degradation, glycolysis, tca cycle, and more .
these pathways have instances in most of the  <dig> organisms we were considering, which enabled a significant outcome.
we generated a distance matrix between pathways as described in the previous section and used the click algorithm  <cit>  for clustering the pathways according to their corresponding rows in this distance matrix.
based on some probabilistic assumptions on the input, click finds both the number of clusters and the partitioning of elements into clusters  <cit> .
as can be seen , two very striking clusters were observed.
each cluster includes metabolic pathways whose pages are very similar to each other and are non similar to pages in the second cluster .
specifically, pathways from the same clusters tend to co-occur in the same organisms and pathways from different clusters tend to occur in different organisms.
the lists of the pathways in each cluster appear in figure 3b.
this result suggests that there is a very strong co-evolution of pathways: even though there are a few variants in each metabolic pathway that can theoretically correspond to a large number of clusters, only two clusters were observed.
it encourages future biological studies about the functional constraints that shaped the observed co-evolutionary relations.
CONCLUSIONS
in this work we describe a new approach for comparing the metabolism of organisms and for studying co-evolution of metabolic pathways.
we show that by adopting this approach one can gain new interesting biological conclusions about the evolution of metabolism in sets of organisms.
naturally, the study presented in this work can be generalized in various ways.
first, when the data in the various pathway databases will be more reliable and robust, we shall be able to use our tool to construct a complete phylogenetic tree based on all the pathways and organisms in such a database .
by using different parameters , different trees would be created.
these trees could then be compared to reference trees using e.g.
the robinson-foulds measure, and that way to determine the best values for the parameters by picking those yielding the best match.
furthermore, such a process could enable comparative studies among the pathway databases themselves; currently, they are incomparable in several ways , making such a study premature.
another idea for future research is to consider an alternative method for reconstructing the phylogenetic trees: it would be to use an iterative process in which the pages of our 3d array are used - one at a time - to refine the constructed tree.
one could sort the pages by their specificity, and at each one of the iterations, the next page would be used in order to refine the distribution of the organisms, and thus create a new level for the tree.
this way one will be able to distinguish among pathways that are common to all forms of life, those that delineate kingdoms and families, all the way to those that constitute the detailed separation into species and even strains.
still, such an approach might present problems in finding the right order for selecting the pathways, and the method presented in this paper - which considers all the pathways together - could well prove advantageous.
finally, we described here a new method for studying co-evolution of metabolic pathways.
our approach considers both the set of enzymes in a pathway and the topology of the pathway.
in this work, we demonstrated this method by analyzing the evolution of  <dig> reliable metabolic pathways over  <dig> organisms.
when reliable data about additional metabolic pathways will be available it will be interesting to use our approach for analyzing a larger set of metabolic pathways.
it will be interesting to use such an analysis for comparing the evolution of entire pathways to the evolution of single genes  that are related to the pathways.
additionally, a similar approach can be used for analyzing other cellular biological sub-networks .
competing interests
the authors declare that they have no competing interests.
authors' contributions
am, ryp, ob and tt participated in the design of the study.
am and tt analyzed the data.
am, ryp, ob and tt wrote the paper.
all the authors approved the final manuscript.

 the increasing availability of pathway information enables the comparative analyses of organisms at the functional level. as the basis for such studies we propose to use pathway alignment, an effective technique that provides both a similarity score as well as a clear indication of specific differences between pathways. the score can be used as yet another type of data with which to build dissimilarity-based phylogenies, but - in addition - the alignment details allow in-depth analysis of the evolutionary changes that various pathways underwent. thus, our method allows a systematic examination of evolutionary relationships among species using their functional traits, based on a description of their entire metabolic processes rather than an individual element as in conventional analysis. in addition, such studies allow us both to further improve pathway alignment techniques by finding more faithful similarity scores, as well as to study co-evolution of metabolic pathways. specifically, there is currently a significant amount of metabolic pathways data residing in public and proprietary databases such as kegg, metacyc, ipath and biocarta. the various databases have mostly overlapping data; however, the pathways of many organisms appear only in some of the databases, or appear in all or some of them but with different constituent enzymes and morphology. nevertheless, this data is rich enough to be used in order to determine similarity in a large set of species and pathways. a single analogous pathway can be used as the basis for generating a similarity matrix between a set of species, and then build a phylogenetic tree that reflects the evolutionary history based on this pathway alone. one pathway, however, does not tell the whole story. the first algorithm that we propose here looks at all the known pathways in a set of organisms and combines their similarity scores in a systematic fashion to produce a more comprehensive picture; an entropy-like weight determines the information contents of each individual pathway when computing the combined similarity score between organisms. furthermore, pathways interact functionally with each other; these interactions can be reflected in their evolution. our second algorithm is a novel approach for studying the co-evolution of metabolic pathways. our method detects pathways whose evolution is correlative both in terms of changes in their topology and in terms of changes in their enzymatic content. the application of our algorithms enabled us to draw some specific conclusions about the usability of pathway information. moreover, we were able to make observations about the evolutionary relationships between certain families of organisms and shed light on their proper classification. for example, we were able to resolve evolutionary relationships among different archaeal species based on their metabolic pathways. furthermore, unique properties common to both thermophilic crenarchaea and euryarchaea were detected. additionally, we used our approach to study co-evolution of metabolic pathways. we discovered that the analyzed pathways can be clustered into two groups according to their evolution. this result may imply that there are strong functional relations between pathways that are part of the same cluster. previous work both the algorithm for inferring phylogeny from metabolic pathways and the algorithm for studying co-evolution of metabolic pathways are based on the alignment of metabolic pathways. there has been considerable work on the alignment of pathways and networks and most methods provide some kind of a similarity score; we refer the reader to for a recent review. dandekar et al. presented one of the earliest efforts introducing comparative analysis of metabolic pathways, combining three methods of comparing biochemical pathways: analysis and comparison of biochemical data, analysis based on elementary modes, and comparative genome analysis. among other results, it showed high plasticity in the glycolysis pathway. clemente et al. used metabolic pathway comparison to show that vital biological processes in a group of related species are usually expressed by a number of highly conserved reactions. furthermore, they show that it is unlikely for a group of reactions to be completely missing form one of the organisms in a set of similar species. there has also been growing interest in the reconstruction of phylogenetic trees from the abovementioned comparison results in recent years. heymans and singh presented a technique for the phylogenetic analysis of metabolic pathways based on the topology of the underlying graphs. they defined a distance measure between graphs using the similarity between nodes of the graphs. this distance measure was applied to the enzyme-enzyme relational graphs derived from metabolic pathways and the resulting distance matrix was used to obtain a phylogenetic tree. in a later work by clemente et al., a software tool that uses metabolic pathway comparison to create phylogenetic trees is presented; the comparison method used here is pseudo-alignment, i.e., mapping each reaction in one pathway to another reaction or a group of reactions in the other. this tool, however, covers only a limited number of organisms and pathways for which a phylogenetic tree can be built. hong et al. presented a method for constructing a phylogenetic tree based on metabolic data deduced from genomic sequences. this method accounts for horizontal gene transfer and specific gene loss by comparing whole metabolic subpathways, and allows evaluation of evolutionary relatedness and changes in metabolic pathways. another work in this area is by chor and tuller. they create phylogenetic trees based on distances between metabolic networks of different species. the distance measure they use is based on the relative description length of the networks, i.e. the number of bits needed to describe one network given the other. this method is more efficient when dealing with large metabolic networks than most other known comparison methods. still, to the best of our knowledge, to date no one has used a score that reflects both the pathway structure as well as the identity of the enzymes in such studies and no systematic handling of all pathways in many organisms has been offered. finally, previous works showed that proteins with similar functionality that physically interact, or that are close to each other in a metabolic network, tend to have similar evolution. however, to the best of our knowledge, no previous work analyzed co-evolution of metabolic pathways by a measure that considers both the enzymes in the pathways and its topology. here we perform for the first time a complete computational comparison of organisms based on all the available metabolic pathways that describe their function, taking into account both enzyme contents as well as pathway topology, and accounting for differences in functionality that is reflected in missing pathways. furthermore, we deduce the co-evolution of pathways in different organisms based on the same data. our results reveal a few novel and biologically significant observations. methods pathway alignment and data organization most pathway databases and repositories, to align the two instances against each other, producing two similarity scores. when looking at a set of n organisms, we can arrange the results of an all-against-all comparison of the organisms for a specific pathway in an n × n matrix a, where aij is the similarity score of aligning the pathway as it appears in organism i with its analogous occurrence in organism j. each such dimensional array is called a page, and in itself it constitutes a similarity matrix that can be used for building a phylogeny. a single pathway, however, is not a good enough basis for deriving meaningful phylogenies. rather, we are interested in a global picture based on all the available pathways. thus, we create a page for each of the m pathways in the database; then, the resulting pages are organized in an n × n × m dimensional array, a, where each page is indexed by the corresponding pathway; now aijk is the similarity score for comparing pathway k as it appears in organisms i and j. note that since some pathways do not exist for some of the organisms, the sizes of the pages might not be commensurate with each other; to accommodate for this phenomenon and to obtain a regular n × n × m 3d array we stretch the pages to be the same size, denoting missing entries appropriately. interpreting and weighting the data analyzing these data in order to obtain insights about the evolutionary history of the organisms was performed as follows: we collapse the 3d array into a 2-dimensional similarity matrix by combining the m entries in each column into one scalar entry; this matrix would serve us as a distance matrix in order to build a phylogenetic tree using known algorithms. the first step in the process of combining a column's entries is setting a threshold that describes scores as relevant: all similarity scores below this threshold will not contribute to the values in the similarity matrix, and all similarity scores above it will contribute to them equally. using this method - on one hand - causes some loss of information, but - on the other hand - enables combining the data in an effective manner while also handling the issue of missing entries that will be discussed in more detail later in this section. for each page we create a threshold graph in the following manner: define a node v ∈ v for each organism; two such nodes are connected by a directed edge e ∈ e if their similarity score is higher than the given threshold. using we calculate w, an assessed weight for each tg: this weight, inspired by shannon's entropy, reflects the amount of information in the page. this formula gives scores ≥ to each graph, based on the degrees of all its nodes. a graph will have w = if the degrees of all nodes in the graph are since the part of the formula will be for each node. alternatively, w = if all node degrees are |v|, in which case the will be equal to for all nodes. in the first case, the organisms are all different from one another and there is nothing to learn about their similarity. in the latter, each organism is "very similar" to all the other organisms, which can teach us nothing new about the whole group. each edge in the tg is given a weight according to this formula. the 3d array is modified by replacing aijk by if nodes i and j are not joined by an edge in the tg corresponding to pathway k, and by the calculated weight w if an edge exists between organisms i and j in the tg. in fact, each page is now the adjacency matrix of the weighted tg. this technique also solves the problem of missing entries, as follows: for the cases where a pathway exists in one of the organisms but does not in the other, we decided never to connect the two organisms with an edge in the tg, and as a result the corresponding entry in the array will always be to accommodate the cases where the pathway is missing in both organisms, we added a new global, boolean parameter b: if b is true then each such two organisms will be joined by an edge, otherwise such edges will not be formed. intuitively, if the confidence in the data is high then b should be assigned true, since in this case the absence of a pathway in both organisms tells us that they are similar in their lacking. if our confidence in the data is low, b should be assigned false since in this case the pathway could be missing due to lack of data, and this might not indicate a real similarity. naturally, using a threshold in forming the tg resulted in loss of information. however, we found that the advantage of being able to include missing entries is far more significant to our results than the information lost by not using the actual alignment score. furthermore, by adjusting the threshold value, we can make sure that our results are as precise as possible. after dealing with this issue we can safely add all the similarity scores in each vector along the pathway axis and thus create a 2-dimensional similarity matrix. building phylogenetic trees the resulting 2d matrix is turned into a dissimilarity matrix so that it can be used as input to an algorithm for building phylogenetic trees, e.g. the neighbor-joining algorithm, as embodied in e.g. the phylip package, as follows: each element in the matrix is subtracted from the maximum element in it; recall that this element must appear along the main diagonal since each organism obtains a perfect similarity score when aligned with itself. finally, it is possible to identify the contribution of specific pathways to the resulting phylogeny: one can trace differences among phylogenetic trees back to the pathways that cause them in order to understand their biological reason; furthermore, the alignments produced by the mph algorithm can be used to further elucidate these differences. moreover, we can study the pathways whose tgs got the highest weights to see if they induce an interesting classification of the organisms into groups. the computational pipeline for inferring a phylogenetic tree based on metabolic pathways the pseudo-code for the computational pipeline is given here: input:   n: number of organisms m: number of pathways p: matrix n*m. entry pij is the instance of pathway j in organism i d: deletion score for mph t: threshold b: boolean parameter to determine whether a pathway missing in two organisms is considered over or under the threshold output: tree: a phylogenetic tree for k:=.m do    for i, j:=.n do       if exists pik and exists pjk then          if size of pik < pjk then aijk:= mph;          else aijk:= mph;       elsif not exists pik and not exists pjk then aijk:= both missing;       else aijk:= one missing;    build graph tg s. t.       v:= {.n};       e:= { | aijk ≥ t}; //only numeric values       if b then e:= e ∪ { | aijk = both missing};   ;    for i, j:=.n do       if ∈ e then aijk:= w);       else aijk:= 0; for i, j:=.n do    simmatij:=; dissimmat:= simmat11* - simmat; tree:= neighbourjoining; the time complexity of this algorithm is o, which is dominated by the time needed to read the entries of the input array, assuming that m >>n. data sources our algorithm was applied to data that was obtained from the metacyc repository. we chose this database since it is very rich in data and it is organized in a way that best suits our requirements, i.e., it contains one variation of each pathway for all the organisms for which it is known. initially we used over metabolic pathways for the organisms that were retrieved from this database. this presented a significant computational challenge, namely making over million individual pathway alignments. fortunately, this problem is "embarrassingly parallel", i.e. each alignment can be run separately, and thus we were able to solve it using a computational grid facility. studying co-evolution of metabolic pathways for comparing the evolution of different metabolic pathways the following steps were performed. first, a distance matrix was computed for each pathway. next, all the pages were compared to each other, one pair at a time. to this end, we considered both the fact that a pathway may appear only in part of the organisms and that in cases that a pathway appears in a pair of organisms its structure in the two organisms may be different. thus, the distance measure between a pair of matrices includes two components: one is the generalized hamming distance that'captures' similar/non-similar appearances in the same organism, h. this can be further explained as follows: let d denote the value of an entry in the distance matrix corresponding to a case where a pathway does not appear in the two organisms; let d denote the value of an entry in the distance matrix corresponding to a case where a pathway appears in the two organisms; let d denote the value of an entry in the distance matrix corresponding to a case where a pathway appears in the first organism but not in the second one; and let d denote the value of an entry in the distance matrix corresponding to a case where a pathway appears in the second organism but not in the first one. let d denote the contribution to the generalized hamming distance due to value xin a certain entry in the page of one pathway and y in the same entry in the page of the second pathway. we used ∀xd = 0; d = d = d = d = d = d = and d = d = d = d = the final score was normalized by dividing it by the number of entries in a page. the second component, l, considers only entries where both pathways appear in both organisms and it is the l distance between the vectors that are composed of these entries in the two organisms. the final distance is a weighted average of the two distances, computed as in. as the first component of the score reflected a rougher distance measure we used wp = 100; however, the result was robust to small changes in wp. based on this measure we generated a distance matrix between pathways that can be further analyzed as described in the next section.  analysis of the entire dataset of metacyc the version of metacyc that was used in this work includes pathways and organisms. using a computational grid comprising nodes we were able to analyze the entire dataset, i.e. to perform more than million individual pathway alignments in just a few days. evolutionary trees based on the entire dataset were very noisy. the main reason for this result is the fact that the data in most of the pathways/organisms are very partial. for example, the mean size of of the pathways over the organisms that appear in the dataset is less than on the other hand, the size of the pathway with the top mean size is thus, as specific biological examples we chose less biased subsets of organisms and pathways. an example: a phylogenetic tree of archaea based on metabolic pathways as a specific biological example we performed a deep biological analysis of all the archaea that appear in metacyc based on their metabolic pathways. we chose this dataset for two main reasons. first, this dataset is less biased since the size of the metabolic network of all archaea in metacyc is relatively similar. second, as the archaea live in extreme and diverse environments it is interesting to compare the changes in their metabolic networks to their phylogeny. a phylogenetic tree that was produced by running the algorithm is displayed in figure 2a and was compared to the ncbi reference tree. note that even though the two trees are differently structured, the basic topology is very similar, i.e. the resulting tree is well separated into methanogens, halophiles, and thermophiles and archaeoglobus fulgidus is farthest from the rest of the organisms. the differences between these two trees are interesting and usually can be explained: the hyperthermophilic a. fulgidus also falls close to the methanogens. this can be explained by the fact that a. fulgidus represents an evolutionary transitional type of organism among the archaea: it is a hyperthermophile and yet is known to be related to methanogens. for example, a. fulgidus contains acetyl-coa decarbonylase/synthase, a multienzyme complex catalyzing the reversible cleavage and synthesis of acetyl-coa in methanogens. a. fulgidus is an example of an organism that contains a functional acds complex and is not a methanogen. furthermore, thermophilic archaea are clustered together. this implies the existence of unique pathways that are found only in thermophiles. anaerobic respiration, tca cycle, and tryptophan biosynthesis pathways in metacyc were found to include specific variations unique to thermophiles while chorismate biosynthesis, formaldehyde assimilation, threonine biosynthesis, and valine biosynthesis pathways were missing from thermophiles in the metacyc dataset. for example, in the chorismate pathway it is known that many archaea do have a distinct shikimate kinase. in addition, a new pathway for the generation of pentoses needed for the chorismate pathway was recently found in thermophilic archaea. another interesting discrepancy between the two trees is the clustering of methanosarcina mazei with halobacteriaceae in the tree that is based on metabolism. this result can be explained by the fact that methanosarcina mazei is a freshwater organism that can adapt to grow at elevated salinities. thus, its metabolism resembles the metabolism of halobacteriaceae that are found in water saturated or nearly saturated with salt. still, there are some unresolved discrepancies between the two trees. one unresolved issue is the intermix of the thermophilic crenarchaea and the thermophilic euryarchaea in the thermophilic cluster. specifically, why are the thermophilic crenarchaea divided in the tree shown in figure 2a? why is pyrococcus horikoshii linked to them whereas the crenarchaeote sofolobus solfataricus is grouped with the euryarchaeotes pyrococcus furiosus, thermoplasma acidophilum, and thermoplasma volcanium? this may be either a result of a curation error in the metacyc database or it may suggest that the metabolism of thermophilic crenarchaea and the thermophilic euryarchaea is not significantly different. we encourage an additional future research on this issue. co-evolution of metabolic pathways we examined our approach for detecting co-evolution of pathways on a subset of the available pathways that are known to be shared by many organisms such as amino acids biosynthesis and degradation, glycolysis, tca cycle, and more. these pathways have instances in most of the organisms we were considering, which enabled a significant outcome. we generated a distance matrix between pathways as described in the previous section and used the click algorithm for clustering the pathways according to their corresponding rows in this distance matrix. based on some probabilistic assumptions on the input, click finds both the number of clusters and the partitioning of elements into clusters. as can be seen, two very striking clusters were observed. each cluster includes metabolic pathways whose pages are very similar to each other and are non similar to pages in the second cluster. specifically, pathways from the same clusters tend to co-occur in the same organisms and pathways from different clusters tend to occur in different organisms. the lists of the pathways in each cluster appear in figure 3b. this result suggests that there is a very strong co-evolution of pathways: even though there are a few variants in each metabolic pathway that can theoretically correspond to a large number of clusters, only two clusters were observed. it encourages future biological studies about the functional constraints that shaped the observed co-evolutionary relations.  in this work we describe a new approach for comparing the metabolism of organisms and for studying co-evolution of metabolic pathways. we show that by adopting this approach one can gain new interesting biological conclusions about the evolution of metabolism in sets of organisms. naturally, the study presented in this work can be generalized in various ways. first, when the data in the various pathway databases will be more reliable and robust, we shall be able to use our tool to construct a complete phylogenetic tree based on all the pathways and organisms in such a database. by using different parameters, different trees would be created. these trees could then be compared to reference trees using e.g. the robinson-foulds measure, and that way to determine the best values for the parameters by picking those yielding the best match. furthermore, such a process could enable comparative studies among the pathway databases themselves; currently, they are incomparable in several ways, making such a study premature. another idea for future research is to consider an alternative method for reconstructing the phylogenetic trees: it would be to use an iterative process in which the pages of our 3d array are used - one at a time - to refine the constructed tree. one could sort the pages by their specificity, and at each one of the iterations, the next page would be used in order to refine the distribution of the organisms, and thus create a new level for the tree. this way one will be able to distinguish among pathways that are common to all forms of life, those that delineate kingdoms and families, all the way to those that constitute the detailed separation into species and even strains. still, such an approach might present problems in finding the right order for selecting the pathways, and the method presented in this paper - which considers all the pathways together - could well prove advantageous. finally, we described here a new method for studying co-evolution of metabolic pathways. our approach considers both the set of enzymes in a pathway and the topology of the pathway. in this work, we demonstrated this method by analyzing the evolution of reliable metabolic pathways over organisms. when reliable data about additional metabolic pathways will be available it will be interesting to use our approach for analyzing a larger set of metabolic pathways. it will be interesting to use such an analysis for comparing the evolution of entire pathways to the evolution of single genes that are related to the pathways. additionally, a similar approach can be used for analyzing other cellular biological sub-networks. competing interests the authors declare that they have no competing interests. authors' contributions am, ryp, ob and tt participated in the design of the study. am and tt analyzed the data. am, ryp, ob and tt wrote the paper. all the authors approved the final manuscript. 
in addition, we discover two striking clusters of metabolic pathways, each cluster includes pathways that have very similar evolution. while previous works in the field performed genomic comparisons and evolutionary studies that were based on specific genes or proteins, whole genomic sequence, or even single pathways, none of them described a genomic system level comparative analysis of metabolic pathways. this approach can be used for building phylogenies and for pointing out specific differences that can then be analyzed in depth. first, we describe a comprehensive, scalable, information theory based computational pipeline that calculates pathway alignment information and then compiles it in a novel manner that allows further analysis. second, we describe a new approach for comparing the evolution of metabolic pathways. this approach can be used for detecting co-evolutionary relationships between metabolic pathways. we demonstrate that distance measures that are based on the topology and the content of metabolic networks are useful for studying evolution and co-evolution.
 pathways provide topical descriptions of cellular circuitry. comparing analogous pathways reveals intricate insights into individual functional differences among species. while previous works in the field performed genomic comparisons and evolutionary studies that were based on specific genes or proteins, whole genomic sequence, or even single pathways, none of them described a genomic system level comparative analysis of metabolic pathways. in order to properly implement such an analysis one should overcome two specific challenges: how to combine the effect of many pathways under a unified framework and how to appropriately analyze co-evolution of pathways. here we present a computational approach for solving these two challenges. first, we describe a comprehensive, scalable, information theory based computational pipeline that calculates pathway alignment information and then compiles it in a novel manner that allows further analysis. this approach can be used for building phylogenies and for pointing out specific differences that can then be analyzed in depth. second, we describe a new approach for comparing the evolution of metabolic pathways. this approach can be used for detecting co-evolutionary relationships between metabolic pathways.  we demonstrate the advantages of our approach by applying our pipeline to data from the metacyc repository. our analysis revealed several surprising biological observations. for example, we show that the different habitats in which archaea organisms reside are reflected by a pathway based phylogeny. in addition, we discover two striking clusters of metabolic pathways, each cluster includes pathways that have very similar evolution.  we demonstrate that distance measures that are based on the topology and the content of metabolic networks are useful for studying evolution and co-evolution. 18- january the eighth asia pacific bioinformatics conference bangalore, india 