This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

GapPenalty

GapPenalty
is an option for SequenceAlignment and related functions that gives the additional cost associated with each gap corresponding to a run of insertions or deletions.
  • GapPenalty->p specifies that the similarity of sequences should have an amount p subtracted for every run of insertions or deletions needed to align the sequences.
By default, an alignment is found with two gaps:
Increasing the penalty for gaps forces another alignment with fewer gaps:
The default alignment score:
Add an additional penalty for the gap:
By default, an alignment is found with two gaps:
In[1]:=
Click for copyable input
Out[1]=
Increasing the penalty for gaps forces another alignment with fewer gaps:
In[2]:=
Click for copyable input
Out[2]=
 
The default alignment score:
In[1]:=
Click for copyable input
Out[1]=
Add an additional penalty for the gap:
In[2]:=
Click for copyable input
Out[2]=
New in 7