# Pan-genome

In the fields of molecular biology and genetics, a pan-genome (pangenome or supragenome) is the entire set of genes from all strains within a clade. More generally, it is the union of all the genomes of a clade. The pan-genome can be broken down into a "core pangenome" that contains genes present in all individuals, a "shell pangenome" that contains genes present in two or more strains, and a "cloud pangenome" that contains genes only found in a single strain. Some authors also refer to the cloud genome as "accessory genome" containing 'dispensable' genes present in a subset of the strains and strain-specific genes. Note that the use of the term 'dispensable' has been questioned, at least in plant genomes, as accessory genes play "an important role in genome evolution and in the complex interplay between the genome and the environment". The field of study of pangenomes is called pangenomics.
The genetic repertoire of a bacterial species is much larger than the gene content of an individual strain. Some species have open (or extensive) pangenomes, while others have closed pangenomes. For species with a closed pan-genome, very few genes are added per sequenced genome (after sequencing many strains), and the size of the full pangenome can be theoretically predicted. Species with an open pangenome have enough genes added per additional sequenced genome that predicting the size of the full pangenome is impossible. Population size and niche versatility have been suggested as the most influential factors in determining pan-genome size.
Pangenomes were originally constructed for species of bacteria and archaea, but more recently eukaryotic pan-genomes have been developed, particularly for plant species. Plant studies have shown that pan-genome dynamics are linked to transposable elements. The significance of the pan-genome arises in an evolutionary context, especially with relevance to metagenomics, but is also used in a broader genomics context. An open access book reviewing the pangenome concept and its implications, edited by Tettelin and Medini, was published in the spring of 2020.

## Etymology

The term 'pangenome' was defined with its current meaning by Tettelin et al. in 2005; it derives 'pan' from the Greek word παν, meaning 'whole' or 'everything', while the genome is a commonly used term to describe an organism's complete genetic material. Tettelin et al. applied the term specifically to bacteria, whose pangenome "includes a core genome containing genes present in all strains and a dispensable genome composed of genes absent from one or more strains and genes that are unique to each strain."

## Parts of the pangenome
### Core

Is the part of the pangenome that is shared by every genome in the tested set. Some authors have divided the core pangenome in hard core, those families of homologous genes that has at least one copy of the family shared by every genome (100% of genomes) and the soft core or extended core, those families distributed above a certain threshold (90%). In a study that involves the pangenomes of Bacillus cereus and Staphylococcus aureus, some of them isolated from the international space station, the thresholds used for segmenting the pangenomes were as follows: "Cloud", "Shell", and "Core" corresponding to gene families with presence in <10%, 10–95%, and >95% of the genomes, respectively.
The core genome size and proportion to the pangenome depends on several factors, but it is especially dependent on the phylogenetic similarity of the considered genomes. For example, the core of two identical genomes would also be the complete pangenome. The core of a genus will always be smaller than the core genome of a species. Genes that belong to the core genome are often related to house keeping functions and primary metabolism of the lineage, nevertheless, the core gene can also contain some genes that differentiate the species from other species of the genus, i.e. that may be related pathogenicity to niche adaptation.

### Shell

Is the part of the pangenome shared by the majority of the genomes in a pangenome. There is not a universally accepted threshold to define the shell genome, some authors consider a gene family as part of the shell pangenome if it shared by more than 50% of the genomes in the pangenome. A family can be part of the shell by several evolutive dynamics, for example by gene loss in a lineage where it was previously part of the core genome, such is the case of enzymes in the tryptophan operon in Actinomyces, or by gene gain and fixation of a gene family that was previously part of the dispensable genome such is the case of trpF gene in several Corynebacterium species.

### Cloud

The cloud genome consists of those gene families shared by a minimal subset of the genomes in the pangenome, it includes singletons or genes present in only one of the genomes. It is also known as the peripheral genome, or accessory genome. Gene families in this category are often related to ecological adaptation.

## Classification

The pan-genome can be somewhat arbitrarily classified as open or closed based on the alpha value of Heaps' law: $N=kn^{-\alpha }$
* $N$ Number of gene families.
* $n$ Number of genomes.
* $k$ Constant of proportionality.
* $\alpha$ Exponent calculated in order to adjust the curve of number of gene families vs new genome.
Usually, the pangenome software can calculate the parameters of the Heap law that best describe the behavior of the data.

### Open pangenome

An open pangenome occurs when the number of new gene families in one taxonomic lineage keeps increasing without appearing to be asymptotic regardless how many new genomes are added to the pangenome. Escherichia coli is an example of a species with an open pangenome. Any E. coli genome size is in the range of 4000–5000 genes and the pangenome size estimated for this species with approximately 2000 genomes is composed by 89,000 different gene families. The pangenome of the domain bacteria is also considered to be open.

### Closed Pangenome

A closed pangenome occurs in a lineage when only few gene families are added when new genomes are incorporated into the pangenome analysis, and the total amount of gene families in the pangenome seem to be asymptotic to one number. It is believed that parasitism and species that are specialists in some ecological niche tend to have closed pangenomes. Staphylococcus lugdunensis is an example of a commensal bacteria with closed pan-genome.

## History
### Pangenome

The original pangenome concept was developed by Tettelin et al. when they analyzed the genomes of eight isolates of Streptococcus agalactiae, where they described a core genome shared by all isolates, accounting for approximately 80% of any single genome, plus a dispensable genome consisting of partially shared and strain-specific genes. Extrapolation suggested that the gene reservoir in the S. agalactiae pan-genome is vast and that new unique genes would continue to be identified even after sequencing hundreds of genomes. The pangenome comprises the entirety of the genes discovered in the sequenced genomes of a given microbial species and it can change when new genomes are sequenced and incorporated into the analysis.
The pangenome of a genomic lineage accounts for the intra lineage gene content variability. Pangenome evolves due to: gene duplication, gene gain and loss dynamics and interaction of the genome with mobile elements that are shaped by selection and drift. Some studies point that prokaryotes pangenomes are the result of adaptive, not neutral evolution that confer species the ability to migrate to new niches.

### Supergenome

The supergenome can be thought of as the real pangenome size if all genomes from a species were sequenced. It is defined as all genes accessible for being gained by a certain species. It cannot be calculated directly but its size can be estimated by the pangenome size calculated from the available genome data. Estimating the size of the cloud genome can be troubling because of its dependence on the occurrence of rare genes and genomes. In 2011 genomic fluidity was proposed as a measure to categorize the gene-level similarity among groups of sequenced isolates. In some lineages the supergenomes did appear infinite, as is the case of the Bacteria domain.

### Metapangenome

'Metapangenome' has been defined as the outcome of the analysis of pangenomes in conjunction with the environment where the abundance and prevalence of gene clusters and genomes are recovered through shotgun metagenomes. The combination of metagenomes with pangenomes, also referred to as "metapangenomics", reveals the population-level results of habitat-specific filtering of the pangenomic gene pool.
Other authors consider that Metapangenomics expands the concept of pangenome by incorporating gene sequences obtained from uncultivated microorganisms by a metagenomics approach. A metapangenome comprises both sequences from metagenome-assembled genomes (MAGs) and from genomes obtained from cultivated microorganisms. Metapangenomics has been applied to assess diversity of a community, microbial niche adaptation, microbial evolution, functional activities, and interaction networks of the community. The Anvi'o platform developed a workflow that integrates analysis and visualization of metapangenomes by generating pangenomes and study them in conjunction with metagenomes.

## Examples
### Prokaryote pangenome

In 2018, 87% of the available whole genome sequences were bacteria fueling researchers interest in calculating prokaryote pangenomes at different taxonomic levels. In 2015, the pangenome of 44 strains of Streptococcus pneumoniae bacteria shows few new genes discovered with each new genome sequenced (see figure). In fact, the predicted number of new genes dropped to zero when the number of genomes exceeds 50 (note, however, that this is not a pattern found in all species). This would mean that S. pneumoniae has a 'closed pangenome'. The main source of new genes in S. pneumoniae was Streptococcus mitis from which genes were transferred horizontally. The pan-genome size of S. pneumoniae increased logarithmically with the number of strains and linearly with the number of polymorphic sites of the sampled genomes, suggesting that acquired genes accumulate proportionately to the age of clones. Another example of prokaryote pan-genome is Prochlorococcus, the core genome set is much smaller than the pangenome, which is used by different ecotypes of Prochlorococcus. Open pan-genome has been observed in environmental isolates such as Alcaligenes sp. and Serratia sp., showing a sympatric lifestyle. Nevertheless, open pangenome is not exclusive to free living microorganisms, a 2015 study on Prevotella bacteria isolated from humans, compared the gene repertoires of its species derived from different body sites of human. It also reported an open pan-genome showing vast diversity of gene pool.
Archaea also have some pangenome studies. Halobacteria pangenome shows the following gene families in the pangenome subsets: core (300), variable components (Softcore: 998, Cloud:36531, Shell:11784).

### Eukaryote pangenome

Eukaryote organisms such as fungi, animals and plants have also shown evidence of pangenomes. In four fungi species whose pangenome has been studied, between 80 and 90% of gene models were found as core genes. The remaining accessory genes were mainly involved in pathogenesis and antimicrobial resistance.
In animals, the human pangenome is being studied. In 2010 a study estimated that a complete human pan-genome would contain ~19–40 Megabases of novel sequence not present in the extant reference human genome. The Human Pangenome consortium has the goal to acknowledge the human genome diversity. In 2023, a draft human pangenome reference was published. It is based on 47 diploid genomes from persons of varied ethnicity. Plans are underway for an improved reference capturing still more biodiversity from a still wider sample.
Among plants, there are examples of pangenome studies in model species, both diploid and polyploid, and a growing list of crops. Pangenomes have shown promise as a tool in plant breeding by accounting for structural variants and SNPs in non-reference genomes, which helps to solve the problem of missing heritability that persists in genome wide association studies. An emerging plant-based concept is that of pan-NLRome, which is the repertoire of nucleotide-binding leucine-rich repeat (NLR) proteins, intracellular immune receptors that recognize pathogen proteins and confer disease resistance.

### Virus pangenome

Virus does not necessarily have genes extensively shared by clades such as is the case of 16S in bacteria, and therefore the core genome of the full Virus Domain is empty. Nevertheless, several studies have calculated the pangenome of some viral lineages. The core genome from six species of pandoraviruses comprises 352 gene families only 4.7% of the pangenome, resulting in an open pangenome.

## Data structures

The number of sequenced genomes is continuously growing "simply scaling up established bioinformatics pipelines will not be sufficient for leveraging the full potential of such rich genomic data sets". Pangenome graphs are emerging data structures designed to represent pangenomes and to efficiently map reads to them. They have been reviewed by Eizenga et al.

## Software tools

As interest in pangenomes increased, there have been several software tools developed to help analyze this kind of data. To start a pangenomic analysis the first step is the homogenization of genome annotation. The same software should be used to annotate all genomes used, such as GeneMark or RAST. In 2015, a group reviewed the different kinds of analyses and tools a researcher may have available. There are seven kinds of software developed to analyze pangenomes: Those dedicated to cluster homologous genes; identify SNPs; plot pangenomic profiles; build phylogenetic relationships of orthologous genes/families of strains/isolates; function-based searching; annotation and/or curation; and visualization.
The two most cited software tools for pangenomic analysis at the end of 2014 were Panseq and the pan-genomes analysis pipeline (PGAP). Other options include BPGA – A Pan-Genome Analysis Pipeline for prokaryotic genomes, GET_HOMOLOGUES, Roary. and PanDelos. In 2015 a review focused on prokaryote pangenomes and another for plant pan-genomes were published. Among the first software packages designed for plant pangenomes were PanTools. and GET_HOMOLOGUES-EST. In 2018 panX was released, an interactive web tool that allows inspection of gene families evolutionary history. panX can display an alignment of genomes, a phylogenetic tree, mapping of mutations and inference about gain and loss of the family on the core-genome phylogeny. In 2019 OrthoVenn 2.0 allowed comparative visualization of families of homologous genes in Venn diagrams up to 12 genomes. In 2023, BRIDGEcerealwas developed to survey and graph indel-based haplotypes from pan-genome through a gene model ID.
In 2020 Anvi'o was available as a multiomics platform that contains pangenomic and metapangenomic analyses as well as visualization workflows. In Anvi'o, genomes are displayed in concentrical circles and each radius represents a gene family, allowing for comparison of more than 100 genomes in its interactive visualization. In 2020, a computational comparison of tools for extracting gene-based pangenomic contents (such as GET_HOMOLOGUES, PanDelos, Roary, and others) has been released. Tools were compared from a methodological perspective, analyzing the causes that lead a given methodology to outperform other tools. The analysis was performed by taking into account different bacterial populations, which are synthetically generated by changing evolutionary parameters. Results show a differentiation of the performance of each tool that depends on the composition of the input genomes. Again in 2020, several tools introduced a graphical representation of the pangenomes showing the contiguity of genes (PPanGGOLiN, Panaroo). Other software tools for pangenomics include Prodigal, Prokka, PanVis, PanTools, Pangenome Graph Builder (PGGB), PanX, Pagoo, and pgr-tk.