07. BLOSUM - BLOcks SUbstitution Matrix

An alternative to the PAM matrix is BLOSUM (BLocks SUbstitution Matrix), which was derived by Henikoff and Henikoff in 1992. NCBI uses BLOSUM62 as its the default matrix for protein BLAST.

Derivation of BLOSUM matrices

BLOSUM matrices are derived from comparisons of blocks of sequences from the Blocks database.

What are blocks and what is the blocks database?

A block is an ungapped multiple alignments of highly conserved, short regions. Here is what a sample block looks like:

Conserved blocks in alignment
Conserved blocks in alignment

The blocks database contains multiple alignments of conserved regions in protein families.

Derivation a BLOSUM matrix

The Henikoffs developed a database of "blocks" based on sequences with shared motifs. More than 2,000 blocks of aligned sequence segments were analyzed from more than 500 groups of related proteins. Within each block, they counted the relative frequencies of amino acids and their substitution probabilities

Why did they use Blocks?

The Henikoffs used blocks due to several reasons:

  • Need to have multiple alignments and it's easier to align with similar sequences.
  • They didn't want to complicate calculations with insertions/deletions.
  • Wanted to focus on conserved regions for computing the scoring matrix.

What does a BLOSUM matrix tell us?

A BLOSUM tells us the likelihood of occurrence of each pairwise substitution, and we can use these values to score a pairwise comparison.

Each scoring matrix is constructed based on how identical the ungapped multiple sequence alignments are. For example, BLOSUM62 is derived from blocks containing at most 62% identity in the ungapped sequence aligments.

Calculating a BLOSUM

Here we'll show you how to calculate a BLOSUM.

Removing redundancies

Before we start constructing a matrix BLOSUM r, we have to eliminate the sequences that are more than r% identical. This solves us from the bias we get from databases over-representing certain classes of proteins. To do this, we have two options:

  1. Remove sequences from the block.
  2. Replace the similar sequences with a new sequence that represents the cluster.
ACD
DCE
DCE
DCE
BCE
BCD
ACB

Since most databases today have an over-representation of proteins, the extraneous DCE sequences should be eliminated in order to make our database more representative.

Calculating possible pairwise combinations

Thus, after elminating redundancies, we look at the first vertical column in our block:

A
D
B
B
A

Let's find out how many possible pairwise combinations we can see for each possible pair.

For the AA pair, we have 2 possible combinations, for AB or BA we have 4. For AD we have 2. We continue these calculations until the occurrence of all possible pairs are found.

PairColumn 1 scoreColumn 2 scoreColumn 3 scoreTotal
AA1001
AB or BA4004
AD or DA2002
BB1001
BD or DB2024
CC010010
DD0011
DE or ED0044
EE0011

Note that the total sum is 26, which we can use to normalize our matrix.

ABCDE
A1
B41
C0010
D2401
E00041

Calculate scores

To obtain integer values for our scoring matrix, we need to find the score per cell. We can do this with the following equation:

sij = log2(qij/eij)

Where qij is observed frequency and eij is the expected frequency.

qij = cij / T

cij is the cell value as calculated above.

To calculate the Total T:

T = w * n(n-1) / 2

Where w is the number of columns and n is the number of sequences. With T, we can calculate qij, which is the rate of change of residue i to residue j.

In our case, T = 30, so let's divide all our cells by 30.

ABCDE
A0.0333
B0.1330.0333
C000.333
D0.06670.13300.0333
E0000.1330.0333

Now pi can be found with the following equation:

pi = qii + ∑(qij/2)
pA = ( 1 + 6/2 ) / 30 = 0.133
pB = ( 1 + 8/2 ) / 30 = 0.167
pC = 10 / 30
pD = ( 1 + 10/2 ) /30 = 0.200
pE = ( 1 + 4/2 ) / 30 = 0.0133

The expected frequencies:

eii = pi2
eij = 2pipj (i ≠ j)
ABCDE
A0.0178
B0.04440.0278
C??0.111
D0.05330.0667?0.04
E???0.040.01

Notice how I didn't calculate cell values that had a value of 0 - you'll see that we don't need these values in the actual scoring matrix.

Now we have all we need! Just plug in values from the two matrices above into the equation below to obtain our scoring matrix.

sij = log2(qij/eij)

To obtain scores, we multiple sij by two and round.

sij = round (2 * log2(qij/eij))
ABCDE
A0.9
B1.580.0278
C000.111
D0.05330.066700.04
E0000.040.01

References


What is a blocks database?
BLOSUM Matrices Lecture. IA State.
Columbia CS Department.

Learn to be a Pythonista!

Introducing Python

Learn to be a Pythonista! Try Python

Easy to understand and fun to read, Introducing Python is ideal for beginning programmers as well as those new to the language. Author Bill Lubanovic takes you from the basics to more involved and varied topics, mixing tutorials with cookbook-style code recipes to explain concepts in Python 3. End-of-chapter exercises help you practice what you learned.

$ Check price
39.9939.99Amazon 4.5 logo(37+ reviews)

More Python resources

Become a Bioinformatics Whiz!

Bioinformatics Data Skills

Become a Bioinformatics Whiz! Try Bioinformatics

Learn the best practices used by academic and industry professionals. Bioinformatics Data Skills give a great overview to the Linux Command Line, Github, and other essential tools used in the trade. This book bridges the gap between knowing a few programming languages and being able to utilize the tools to analyze large amounts of biological data.

$ Check price
49.9949.99Amazon 4.5 logo(7+ reviews)

More Bioinformatics resources

Ad