# Sequence space (evolution)

In evolutionary biology, sequence space is a way of representing all possible sequences (for a protein, gene or genome). The sequence space has one dimension per amino acid or nucleotide in the sequence leading to highly dimensional spaces.
Most sequences in sequence space have no function, leaving relatively small regions that are populated by naturally occurring genes. Each protein sequence is adjacent to all other sequences that can be reached through a single mutation. It has been estimated that the whole functional protein sequence space has been explored by life on the Earth. Evolution by natural selection can be visualised as the process of sampling nearby sequences in sequence space and moving to any with improved fitness over the current one.

## Representation

A sequence space is usually laid out as a grid. For protein sequence spaces, each residue in the protein is represented by a dimension with 20 possible positions along that axis corresponding to the possible amino acids. Hence there are 400 possible dipeptides arranged in a 20x20 space but that expands to 10$^{130}$ for even a small protein of 100 amino acids arranged in a space with 100 dimensions. Although such overwhelming multidimensionality cannot be visualised or represented diagrammatically, it provides a useful abstract model to think about the range of proteins and evolution from one sequence to another.
These highly multidimensional spaces can be compressed to 2 or 3 dimensions using principal component analysis. A fitness landscape is simply a sequence space with an extra vertical axis of fitness added for each sequence.

## Functional sequences in sequence space

Despite the diversity of protein superfamilies, sequence space is extremely sparsely populated by functional proteins. Most random protein sequences have no fold or function. Enzyme superfamilies, therefore, exist as tiny clusters of active proteins in a vast empty space of non-functional sequence.
The density of functional proteins in sequence space, and the proximity of different functions to one another is a key determinant in understanding evolvability. The degree of interpenetration of two neutral networks of different activities in sequence space will determine how easy it is to evolve from one activity to another. The more overlap between different activities in sequence space, the more cryptic variation for promiscuous activity will be.
Protein sequence space has been compared to the Library of Babel, a theoretical library containing all possible books that are 410 pages long. In the Library of Babel, finding any book that made sense was impossible due to the sheer number and lack of order. The same would be true of protein sequences if it were not for natural selection, which has selected out only protein sequences that make sense. Additionally, each protein sequences is surrounded by a set of neighbours (point mutants) that are likely to have at least some function.
On the other hand, the effective "alphabet" of the sequence space may in fact be quite small, reducing the useful number of amino acids from 20 to a much lower number. For example, in an extremely simplified view, all amino acids can be sorted into two classes (hydrophobic/polar) by hydrophobicity and still allow many common structures to show up. Early life on Earth may have only four or five types of amino acids to work with, and researches have shown that functional proteins can be created from wild-type ones by a similar alphabet-reduction process. Reduced alphabets are also useful in bioinformatics, as they provide an easy way of analyzing protein similarity.

## Exploration through directed evolution and rational design

A major focus in the field of protein engineering is on creating DNA libraries that sample regions of sequence space, often with the goal of finding mutants of proteins with enhanced functions compared to the wild type. These libraries are created either by using a wild type sequence as a template and applying one or more mutagenesis techniques to make different variants of it, or by creating proteins from scratch using artificial gene synthesis. These libraries are then screened or selected, and ones with improved phenotypes are used for the next round of mutagenesis.