GLAM2 is a part of the MEME suite that is able to analyze a collection of DNA or protein sequences to discover gapped motifs (that is, common subsequences that exhibit some insertions and deletions).

"GLAM" stands for "Gapped Local Alignment of Motifs." It assigns a score to a local alignment by favoring matched symbols and penalizing indels. For long strings, it is impossible to guarantee finding an optimal alignment because of the huge number of possible alignments, and so GLAM2 uses a heuristic approach (called "simulated annealing").