A linear gap penalty assigns a cost proportional to gap length: for . One gap of length three and three gaps of length one therefore incur the same total cost, before considering alignment substitutions. An affine gap penalty distinguishes opening from extending a gap and can favour fewer longer gaps. The chosen cost is part of the alignment model rather than an experimentally measured universal price of an insertion. [ref]
Basic local alignment search tool by Stephen F. Altschul and others. 1990, alignment scores and the distinction from exhaustive gapped comparison
New to topics? Read the docs here!