Question: FIMO score calculation
0
gravatar for bharata1803
2.6 years ago by
bharata1803470
Japan
bharata1803470 wrote:

Hello,

So, I use FIMO for calculating PWM score for a sequence.

How does FIMO calculate the score actually? It says it is the log likelihood of the PWM given background.

Can anyone give step by step? Suppose I have PWM:

    A   C   G   T
1   0.2 0.4 0.4 0
2   0.4 0.2 0.4 0
3   0.6 0   0.2 0.2
4   0   1   0   0
5   1   0   0   0
6   0   0   0.8 0.2
7   0   0.2 0.8 0
8   0   0   0   1
9   0   0   1   0
10  0   0.2 0.4 0.4
11  0   0.4 0   0.6
12  0.2 0   0.6 0.2

And sequence: GGGCAGCTGGCA And background:

A   0.275
C   0.225
G   0.275
T   0.225

FIMO score is: 10.8211

pwm fimo • 1.3k views
ADD COMMENTlink modified 14 months ago by caokai0010 • written 2.6 years ago by bharata1803470

This answer explains it well.

ADD REPLYlink written 14 months ago by jared.andrews077.3k
0
gravatar for caokai001
14 months ago by
caokai0010
Huazhong agricultural university
caokai0010 wrote:

Hi,i have try do it ,FiMO score is 10.9328,It's closer to your value,is it correct?

A=c(0.2 ,0.4 ,0.4 ,0.0 ,0.4 ,0.2, 0.4, 0.0, 0.6, 0.0, 0.2, 0.2, 0.0,1.0, 0.0 ,0.0 ,1.0 ,0.0, 0.0 ,0.0, 0.0, 0.0, 0.8, 0.2, 0.0, 0.2,0.8, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.2, 0.4,0.4, 0.0, 0.4, 0.0, 0.6, 0.2, 0.0, 0.6, 0.2)

pfm=matrix(A, nrow =4,dimnames = list(c("A","C","G","T")))
B=matrix(c(rep(0.275,12),rep(0.225,12),rep(0.275,12),rep(0.225,12)),nrow = 4,byrow = T)
C=log(pfm/B,2)
C=round(C,4)
Seq="GGGCAGCTGGCA"
tmp=unlist(strsplit(Seq,""))
Sum=0
    for (i in seq(1,12)){
      #print(C[tmp[i],as.integer(i)])
      Sum=Sum+C[tmp[i],as.integer(i)]
      }
    print(as.vector(Sum))

> print(as.vector(Sum)) [1] 10.9328

ADD COMMENTlink modified 14 months ago • written 14 months ago by caokai0010
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: 1885 users visited in the last hour