jebl.evolution.distances
Class ModelBasedDistanceMatrix

java.lang.Object
  extended by jebl.evolution.distances.ModelBasedDistanceMatrix

public class ModelBasedDistanceMatrix
extends Object

Author:
Joseph Heled

Field Summary
protected static double freqR
           
protected static double freqY
           
protected static double MAX_DISTANCE
           
 
Constructor Summary
ModelBasedDistanceMatrix()
           
 
Method Summary
protected static double[] getFrequencies(Alignment alignment)
           
protected static double[] getFrequencies(List<Sequence> sequences)
          As a side effect, this method sets freqR and freqY if called on nucleotide sequences.
protected static double[] getFrequenciesSafe(Alignment alignment)
           
protected static double[] getFrequenciesSafe(List<Sequence> sequences)
          As a side effect, this method sets freqR and freqY if called on nucleotide sequences.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_DISTANCE

protected static final double MAX_DISTANCE
See Also:
Constant Field Values

freqR

protected static double freqR

freqY

protected static double freqY
Constructor Detail

ModelBasedDistanceMatrix

public ModelBasedDistanceMatrix()
Method Detail

getFrequenciesSafe

protected static double[] getFrequenciesSafe(List<Sequence> sequences)
As a side effect, this method sets freqR and freqY if called on nucleotide sequences.

Parameters:
sequences - A list of sequences of the same type
Returns:
Approximation of the relative canonical state frequencies in the sequences; Each frequency is guaranteed to be > 0 (and therefore it can only be an approximation).

getFrequenciesSafe

protected static double[] getFrequenciesSafe(Alignment alignment)

getFrequencies

protected static double[] getFrequencies(List<Sequence> sequences)
As a side effect, this method sets freqR and freqY if called on nucleotide sequences.

Parameters:
sequences - A list of sequences of the same type
Returns:
Relative canonical state frequencies in the sequences;

getFrequencies

protected static double[] getFrequencies(Alignment alignment)