Question: How to calculate the Position Weight Matrix score?
0
gravatar for jordidebruin
23 months ago by
jordidebruin0 wrote:

Hi,

Can anyone explain me how to calculate the Position Weight Matrix score?

I know the formula, but I don't understand it. I have a table with the frequences of nucleotides, and a table with the PWM scores:

Frequences of nucleotides:

Position:            1       2        3        4        5

A                    0       0.9      0.1      0.6      0.2
C                    0       0        0.2      0.1      0.2
G                    0       0        0.1      0        0.1
T                    1       0.1      0.6      0.3      0.5

And I have the corresponding PWM scores:

Position:            1       2        3        4         5

A                            1.848   -1.322    1.263    -0.322
C                                    -0.322   -1.322    -0.322
G                                    -1.322             -1.322
T                    1      -1.322    1.263    0.263     1

But, I have no idea how this scores are calculated. The formula is:

enter image description here

But I don't understand this.

Can anyone explain me step by step how I can calculate this scores?

I especially don't understand how to calculate p(b,i).

Thanks! :)

score pssm pwm bioinformatics • 4.6k views
ADD COMMENTlink modified 15 months ago by yjjjng09010 • written 23 months ago by jordidebruin0
4
gravatar for Santosh Anand
23 months ago by
Santosh Anand4.7k
Santosh Anand4.7k wrote:

p(b) = expected background frequency of each nucleotides. You can assume it to be 0.25 (4 nucleotides distributed uniformly in background).

p(b, i) is the frequency of the corresponding row and column. Example:

Pos 2A: PWM = log2(0.9/0.25)

Pos 2T = log2(0.1/0.25)

Basically, you have to divide the frequency matrix by 0.25 (the background frequency of each nucleotide) and take the log2 of result.

ADD COMMENTlink modified 23 months ago • written 23 months ago by Santosh Anand4.7k

Thank you very much!! Now I understand it.

ADD REPLYlink written 23 months ago by jordidebruin0
0
gravatar for yjjjng0901
15 months ago by
yjjjng09010
yjjjng09010 wrote:

but the caculation result is: math.log(0.9/0.25) 1.2809338454620642 it does not equal to what you said Pos 2A: PWM = log2(0.9/0.25).

ADD COMMENTlink written 15 months ago by yjjjng09010

take log on base2 (log2) instead of natural log (base e).

ADD REPLYlink written 15 months ago by Santosh Anand4.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1604 users visited in the last hour