Question: FIMO score calculation
0
gravatar for bharata1803
17 months ago by
bharata1803420
Japan
bharata1803420 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 • 704 views
ADD COMMENTlink modified 10 days ago by caokai0010 • written 17 months ago by bharata1803420

This answer explains it well.

ADD REPLYlink written 10 days ago by jared.andrews072.7k
0
gravatar for caokai001
10 days 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 10 days ago • written 10 days 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: 943 users visited in the last hour