Class PhylogenyMath

java.lang.Object
org.episteme.natural.biology.phylogeny.PhylogenyMath

public class PhylogenyMath extends Object
Basic phylogenetics utilities and mathematical models.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • PhylogenyMath

      public PhylogenyMath()
  • Method Details

    • calculateDistanceMatrix

      public static Real[][] calculateDistanceMatrix(List<String> sequences)
      Calculates distance matrix from a list of aligned sequences. Using simple Hamming distance (p-distance).
      Parameters:
      sequences - List of aligned DNA strings (same length)
      Returns:
      Symmetric distance matrix
    • pDistance

      public static Real pDistance(String s1, String s2)
      p-distance: proportion of nucleotide sites that are different. d = n_d / n
    • jukesCantorDistance

      public static Real jukesCantorDistance(Real pDistance)
      Jukes-Cantor distance correction. d_JC = -3/4 * ln(1 - 4/3 * p)