Creating MAST motifs

93 views
Skip to first unread message

CharlesEGrant

unread,
Oct 26, 2012, 7:10:05 PM10/26/12
to meme-...@googlegroups.com
Originally posted by j.johnson Oct 17 2011
-
he original version of MEME did not output the position specific probability matrix (PSPM) but only the position specific scoring matrix (PSSM). This meant that when MAST was written it was designed to read the PSSM. Later on, after MEME had the PSPM added to its output, all new programs written used the PSPM. This gave the advantages of allowing user specified background models while being easier to understand and hand craft motifs. The downside was that you still needed the separate PSSM section to run MAST. 

The MEME 4.7.0 release contained a complete rewrite of the motif loading code and it included the ability to translate the PSPM section into the PSSM and vice-versa when either was missing. This means that MAST can now read PSPM motifs that previously only the other MEME Suite programs could and the other MEME Suite programs can read PSSM motifs that previously only MAST could. 

However if you must use an old version of the MEME Suite this is formula used to calculate the position specific score from a position specific probability and a background. 

let bL be the background probabilities for letter L

let pLi be the probability for the letter L at position i
let sLi be the score for the letter L at position i

sLi = round((log(pLi / bL) / log(2)) * 100)


Note that if you have any zeros in your PSPM you will need to apply a pseudocount before you attempt the conversion as the log of zero is negative infinity (or undefined). The MEME Suite adds pseudocounts using the following formula: 

let bL be the background probabilities for letter L

let pLi be the probability for the letter L at position i
let n be the number of motif sites
let d be the pseudocount
let fLi be the probability with pseudocount

fLi = ((pLi * n) + (bL * d)) / (n + d)


And if it still ends up equal to zero then our code sets it to 0.0000005.

Reply all
Reply to author
Forward
0 new messages