2
$\begingroup$

I have a bioinformatics exam coming up. I can understand the difference between the global algorithm and the local algorithm, but I have a problem with gap opening penalty and gap extension penalty. What is the difference between gap opening penalty and gap extension?

Can anybody help me in working out how to use the gap opening penalty and gap extension penalty for blosum62?

There are a lot of questions like the one below:

Compute the score of the following sequence alignment given the BLOSUM62 matrix below and gap opening penalty (GOP) = 12, and gap extension penalty (GEP) = 2.

SDRVIKAAIFDPIQPDF---G-----PVYFGLGHVH
RDLVERLFILDMI-PGLIKAGDSFPIPVALMINHIF

   A  R  N  D  C  Q  E  G  H  I  L  K  M  F  P  S  T  W  Y  V
A  4 -1 -2 -2  0 -1 -1  0 -2 -1 -1 -1 -1 -2 -1  1  0 -3 -2  0
R -1  5  0 -2 -3  1  0 -2  0 -3 -2  2 -1 -3 -2 -1 -1 -3 -2 -3
N -2  0  6  1 -3  0  0  0  1 -3 -3  0 -2 -3 -2  1  0 -4 -2 -3
D -2 -2  1  6 -3  0  2 -1 -1 -3 -4 -1 -3 -3 -1  0 -1 -4 -3 -3
C  0 -3 -3 -3  9 -3 -4 -3 -3 -1 -1 -3 -1 -2 -3 -1 -1 -2 -2 -1
Q -1  1  0  0 -3  5  2 -2  0 -3 -2  1  0 -3 -1  0 -1 -2 -1 -2
E -1  0  0  2 -4  2  5 -2  0 -3 -3  1 -2 -3 -1  0 -1 -3 -2 -2
G  0 -2  0 -1 -3 -2 -2  6 -2 -4 -4 -2 -3 -3 -2  0 -2 -2 -3 -3
H -2  0  1 -1 -3  0  0 -2  8 -3 -3 -1 -2 -1 -2 -1 -2 -2  2 -3
I -1 -3 -3 -3 -1 -3 -3 -4 -3  4  2 -3  1  0 -3 -2 -1 -3 -1  3
L -1 -2 -3 -4 -1 -2 -3 -4 -3  2  4 -2  2  0 -3 -2 -1 -2 -1  1
K -1  2  0 -1 -3  1  1 -2 -1 -3 -2  5 -1 -3 -1  0 -1 -3 -2 -2
M -1 -1 -2 -3 -1  0 -2 -3 -2  1  2 -1  5  0 -2 -1 -1 -1 -1  1
F -2 -3 -3 -3 -2 -3 -3 -3 -1  0  0 -3  0  6 -4 -2 -2  1  3 -1
P -1 -2 -2 -1 -3 -1 -1 -2 -2 -3 -3 -1 -2 -4  7 -1 -1 -4 -3 -2
S  1 -1  1  0 -1  0  0  0 -1 -2 -2  0 -1 -2 -1  4  1 -3 -2 -2
T  0 -1  0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1  1  5 -2 -2  0
W -3 -3 -4 -4 -2 -2 -3 -2 -2 -3 -2 -3 -1  1 -4 -3 -2 11  2 -3
Y -2 -2 -2 -3 -2 -1 -2 -3  2 -1 -1 -2 -1  3 -3 -2 -2  2  7 -1
V  0 -3 -3 -3 -1 -2 -2 -3 -3  3  1 -2  1 -1 -2 -2  0 -3 -1  4
$\endgroup$
3
  • $\begingroup$ so could you help me please about solution? $\endgroup$ Nov 8, 2019 at 21:49
  • $\begingroup$ The lower matrix is the blosom62. The two sequences are the pairwise alignment... easy. The gap penalties are described by here... en.m.wikipedia.org/wiki/Gap_penalty ... I don't have code for this and I'm not a fan of optical analysis, so I'm not going to add up the numbers $\endgroup$
    – M__
    Nov 9, 2019 at 3:02
  • $\begingroup$ my function align not using matrix... i have implemented one algo that can fail...possible it is better one good eye too $\endgroup$
    – RosLuP
    Dec 5, 2020 at 21:18

1 Answer 1

1
$\begingroup$

Your alignment is

SDRVIKAAIFDPIQPDF---G-----PVYFGLGHVH RDLVERLFILDMI-PGLIKAGDSFPIPVALMINHIF

For each position in the alignment you calculate the score for that alignment. For position 1 we'd look up S vs R in the matrix and find a score of -1. You continue doing this until you hit the first -, which is not in the matrix. The first - is a gapopening, each consequent - in a series of -'s counts as a gap extension, instead of an opening.

---G-- IKAGDS gives -12 -2 -2 6 -12 -2

$\endgroup$
3
  • $\begingroup$ The problem with the example is a gap penalty of 12 and 2 means the position of G is critical to the output, regardless of its location as a biological homologue. If G is at the beginning or end of the indel the score drops considerably, ie only a single gap opening penalty. $\endgroup$
    – M__
    Nov 11, 2019 at 10:53
  • $\begingroup$ That is a matter of alignment score maximisation, the author's question regards calculating the score of the given alignment with the given BLOSUM matrix, and how to incorporate the gap penalties into this. $\endgroup$
    – Pallie
    Nov 11, 2019 at 11:05
  • $\begingroup$ SDRVIKAAIFDPIQPDF---G-----PVY------FGLGHVH RDLVERLFILDMI-PGLIKAGDSFPIPVALMINHIF------ has one uguagliance more $\endgroup$
    – RosLuP
    Dec 5, 2020 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.