I am trying to understand how the BLOSUM matrix is calculated.
I found a very nice tutorial here: http://www.cs.columbia.edu/4761/assignments/assignment1/reference1.pdf
Also i read through the wikipedia article, and a book "Understanding bioinformatics" from Marketa Zvelebim and Jeremy O. Baum
After i thought i understand the method i tried myself with this "alignment" (i will refer to the variable as they are at the link i provided)
Q
Q
S
So it has only one column, and 2 type of amino acids.
The Count pair frequencies (C) for Q -> Q substitution is 1 (2*1/2) and for Q -> S it should be 2 (2*1).
To normalise it T = 3 as 3*2/2
The q values then seem to be q(Q->Q) = 1/3, q(Q->S) = 2/3
The p(Q) is then 1/3 + 2/3/2 = 4/6
p(S) is 2/3+1/3/2 = 2/6
The e(Q->Q) = (4/6)^2 = 4/9
e(Q->S) = 4/6*2/6*2 = 4/9
Thus
S(Q->Q) = round(log2((1/3)/(4/9)) = -1
S(Q->S) = round(log2((2/3)/(4/9)) = 1
So from this alignment it is more likely to substitute a Q to an S rather then Q to Q? This makes no sense for me.
What am i missing?