+With NCBI, the idea is to use the existing annotations of NCBI with chloroplast genomes. To extract the core and pan genes: Core extraction techniques with NCBI are based on two techniques: Gene count and Gene contents based on some similarity issues.
+
+\subsubsection{Core genes based on NCBI Gene names and Counts}
+The trivial and simple idea to construct the core genome is based on the extraction of Genes names (as gene presence or absence). For instant, in this stage neither sequence comparison nor new annotation were made, we just want to extract all gene counts stored in each chloroplast genome then find the intersection core genes based on gene names.\\
+
+\textbf{Step I: pre-processing}\\
+The objective from this step is to organize, solve genes duplications, and generate sets of genes for each genome. The input to the system is a list genomes from NCBI stored as a \textit{.fasta} file that include a collection of coding genes\cite{parra2007cegma}(genes that produce protein) with its coding sequences.
+As a preparation step to achieve the set of core genes, we need to translate these genomes and extracting all information needed to find the core genes. This is not an easy job. The output from this operation is a lists of genes stored in a local database for genomes, their genes names and genes counts. In this stage, we will accumulate some Gene duplications with each genome treated. In other words, duplication in gene name can comes from genes fragments as long as chloroplast DNA sequences. Identical state, which it is the state that each gene present only one time in a genome (i.e Gene has no copy) without considering the position or gene orientation can be reached by filtering the database from redundant gene name. To do this, we have two solutions: first, we made an orthography checking. Orthography checking is used to merge fragments of a gene to be one gene so that we can solve a duplication.
+Second, we convert the list of genes names for each genome (i.e. after orthography check) in the database to be a set of genes names. Mathematically speaking, if $g=\left[g_1,g_2,g_3,g_1,g_3,g_4\right]$ is a list of genes names, by using the definition of a set in mathematics, we will have $set(g)=\{g_1,g_2,g_3,g_4\}$, where each gene represented only ones. With NCBI genomes, we do not have a problem of genes fragments because they already treated it, but there are a problem of genes orthography. This can generate the problem of gene lost in our method and effect in turn the core genes.
+The whole process of extracting core genome based on genes names and counts among genomes is illustrate in Figure 3.
+
+\begin{figure}[H]
+\caption{Extracting Core genome based on Gene Counts}
+ \centering
+ \includegraphics[width=0.7\textwidth]{NCBI_GeneName}
+\end{figure}
+
+\textbf{Step II: Gene Intersection}\\
+The main objective of this step is try to find best core genes from sets of genes in the database. The idea for finding core genes is to collect in each iteration the maximum number of common genes. To do this, the system build an intersection core matrix(ICM). ICM here is a two dimensional symmetric matrix where each row and column represent the list of genomes in the local database. Each position in ICM stores the \textit{intersection scores}. Intersection Score(IS), is the score by intersect in each iteration two sets of genes for two different genomes in the database. Taking maximum score from each row and then taking the maximum of them will result to draw the two genomes with their maximum core. Then, the system remove these two genomes from ICM and add the core of them under a specific name to ICM for the calculation in next iteration. The core genes generated with its set of genes will store in a database for reused in the future. this process repeat until all genomes treated. If maximum intersection core(MIC) equal to 0, the system will avoid this intersection operation and ignore the genome that smash the maximum core genes.\\
+We observe that ICM will result to be very large because of the huge amount of data that it stores. In addition, this will results to be time and memory consuming for calculating the intersection scores by using just genes names. To increase the speed of calculations, we can calculate the upper triangle scores only and exclude diagonal scores. This will reduce whole processing time and memory to half. The time complexity for this process after enhancement changed from $O(n^2)$ to $O((n-1)\log{n})$.\\
+The Algorithm of construction the matrix and extracting maximum core genes where illustrated in Algorithm 1. The output from this step is list of core genes with their lengths to be drawn in a tree.