Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica >

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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team