A gap is an inserted or deleted substring of a genetic string, particularly in the consideration of alignment problems. The gap is represented by a contiguous interval of gap symbols; the symbols with which the gap is aligned represents the insertion or deletion of an interval of nucleotides or amino acids from a nucleic acid or protein, respectively.
The figure below shows an alignment of two protein strings in which the second augmented string has a gap of 20 amino acids. This gap corresponds to a gap deletion if we view the alignment as a transformation of the top string into the bottom string.