FIMO score calculation

106 views
Skip to first unread message

Leonardo Jo

unread,
Dec 21, 2017, 6:39:18 PM12/21/17
to MEME Suite Q&A

Hello Everyone,
Does anyone know how FIMO calculates the matched score?

When I tried to FIMO to scan this sequence (ACACGTGGTA) using this specific motif:
Background letter frequencies (from file `./background'):
A 0.27670 C 0.22330 G 0.22330 T 0.27670 
MOTIF 1 ACACGTGKCA-MEME-1
letter-probability matrix: alength= 4 w= 10 nsites= 600 E= 5.3e-610
0.4633330.2233330.210.103333
0.0833330.6116670.0750.23
0.89500.1050
0.050.80.0666670.083333
0.0150.0016670.9516670.031667
00.02333300.976667
0010
00.0450.4250.53
0.0983330.830.0116670.06
0.5066670.1450.2350.113333


I get this final output:
# motif_id	motif_alt_id	sequence_name	start	stop	strand	score	p-value	q-value	matched_sequence
1	ACACGTGKCA-MEME-1	1	1	10	-	11.3939	6.55e-05	0.000786	ACACGTGGTA

I was doing some research and it seems that the score is calculated by summing the appropriate entries from each column of the position-dependent scoring matrix.
And the position-dependent scoring matrix is determined by log2(p/q)
p: Normalized frequency counts of a specific nucleotide in a specific position (for example: for an Adenine at position 1, you would use 0.463333) ;
q: Background frequencies for each base in the genome;

After calculation, the score that I get is 11.40194089. Which is slightly different from the reported in FIMO (11.3939).
Does anyone know what is the exact formula used for the FIMO score calculation? Am I doing something wrong?
I would appreciate if someone could help me with this one,
Thanks,

CharlesEGrant

unread,
Dec 26, 2017, 2:03:27 PM12/26/17
to MEME Suite Q&A
One thing you may be missing is that, by default, FIMO adds a pseudo-count of 0.1 to each element of the PWM. This is described in the section on the --motif-pseudo option in the command line documentation for FIMO. 

The best reference for the FIMO scoring algorithm is the FIMO source code which is included in the MEME Suite source distribution. In particular look at the build_motif_pssm() function in the psst.c file.



Reply all
Reply to author
Forward
0 new messages