This step considers as input the set 
$\{((g_1,g_2),r_{12}), (g_1,g_3),r_{13}), (g_{n-1},g{n}),r_{n-1.n})\}$ of 
$\frac{n(n-1)}{2}$ elements. 
Each one $(g_i,g_j),r_{ij})$ where $i < j$, 
is a pair that gives the similarity rate $r_{ij}$ between the two genes  
$g_{i}$ and $g_{j}$.

The first step of this stage consists in building the following non-oriented
graph further denoted as to \emph{similarity graph}.
In this one, the vertices are the genes. There is an edge between 
$g_{i}$ and $g_{j}$ if the rate $r_{ij}$ is greater than a given similarity 
threshold $t$.

We then define the relation $\sim$  such that
$ x \sim y$ if $x$ and $y$ belong in the same connected component.
Mathematically speaking, it is obvious that this 
defines an equivalence relation. 
Let $\dot{x}= \{y  | x \sim y\}$
denotes the equivalence class to which $x$ belongs.
All the genes which are  equivalent to each other
are also elements of the same equivalence class.
Let us then consider the set of all equivalence classes of the set of genes 
by $\sim$, denoted $X/\sim = \{\dot{x} | x \textrm{ is a gene}\}$. 
defined by $\pi(x) = \dot{x}$
which maps each gene  into it respective equivalence class by $\sim$.




For each genome $[g_l,\ldots,g{l+m}]$, the second step computes 
the projection of each gene according to $\pi$. 
The resulting genome  which is 
$$
[\pi(g_l),\ldots,\pi(g{l+m})]
$$ 
is again of size $m$.

Intuitively speaking, for two genes $g_i$ and $g_j$ 
in the same equivalence class, there is path from  $g_i$ and $g_j$.
It signifies that  each evolution step 
(represented by an edge in the similarity graph) 
has produced a gene s.t. the similarity with the previous one 
is greater than $t$. 
Genes $g_i$ and $g_j$ may thus have a common ancestor.


We compute the core genome as follow.
Each genome is projected according to $\pi$. We then consider the 
intersection of all the projected genomes which are considered as sets of genes
and not as sequences of genes.
This results as the set of all the class $\dot{x}$
such that each genome has an gene $x$ in  $\dot{x}$.
The pan genome is computed similarly: the union of all the 
projected genomes in computed here.

