[Biojava-l] log-odds ratio

Ren, Zhen zren at amylin.com
Wed Mar 19 10:58:50 EST 2003


Thanks, Matthew.  Your email prompted me to look into the source code.  Weight matricies do use the log odds.  The DP.scoreWeightMatrix(matrix, seq, offset) method does the computation.  But, in the WeightMatrixAnnotator.java file line 60 Math.exp(score); brings the log odds score back to odds score.  That's why the output from the WeightMatrixDemo program is odd scores.

Hi, Matthew, by the way, can we talk about the BioJava cousulting service from your company and the forth-comming BioJava book?  Thanks again.

Zhen

-----Original Message-----
From: Matthew Pocock [mailto:matthew_pocock at yahoo.co.uk]
Sent: Wednesday, March 19, 2003 9:55 AM
To: Ren, Zhen
Cc: biojava-l at biojava.org
Subject: Re: [Biojava-l] log-odds ratio


The dynamic programing code all use log odds (or log probabilities for 
forwards/backwards training) for exactly this reason. I guess weight 
matricies should do this too. If you're searching with a long weight 
matrix, then you should probably be using a profile HMM though.

Matthew

Ren, Zhen wrote:
> Hi, there,
> 
> The WeightMatrixDemo example at "BioJava In Anger" page (http://bioconf.otago.ac.nz/biojava/weightMatrix.htm?PHPSESSID=0adccafdabe1f2c52b062649c404c50f generates a WeightMatrix from an aligment and uses that matrix to annotate a Sequence with a threshold of 0.1.  This program uses the odds ratio.  I wonder if BioJava has the capacity to use the log-odds ratio (an additive scoring system) to avoid overflow.  So, I guess very slight modification can do the same thing as this program does.  Thanks.
> 
> Zhen
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
> 


-- 
BioJava Consulting LTD - Support and training for BioJava
http://www.biojava.co.uk




More information about the Biojava-l mailing list