Class AcgtTree


  • public class AcgtTree
    extends java.lang.Object
    ACGT tree
    Author:
    pcingola
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static char[] BASES  
      static int FAKE_COUNTS  
      static double LOG2  
      static double MAX_ENTROPY  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        AcgtTree()  
      protected AcgtTree​(java.lang.String name, AcgtTree parent)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String sequence)  
      static int base2index​(char base)  
      double entropy()
      Calculate the entropy
      java.util.List<java.lang.Double> entropyAll​(int thresholdCount)  
      java.util.List<java.lang.String> findNodeNames​(double thresholdEntropy, double thresholdP, int thresholdCount)
      Find node names that are within the thresholds
      AcgtTree get​(char base)
      Get a node
      AcgtTree get​(java.lang.String bases)
      Get node indexed by this string
      AcgtTree getOrCreate​(char base)
      Get a node (create it if it doesn't exist)
      int getTotalCount()  
      void inc​(char base)
      Increment counter for a base
      java.util.List<java.lang.Double> pAll​(int thresholdCount)  
      protected void pAll​(int thresholdCount, java.util.List<java.lang.Double> ps)  
      double seqConservation()  
      void set​(char base, AcgtTree n)
      Set a node
      java.lang.String toString()  
      java.lang.String toString​(java.lang.String tabs, double thresholdEntropy, double thresholdP, int thresholdCount)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • BASES

        public static final char[] BASES
      • LOG2

        public static final double LOG2
    • Constructor Detail

      • AcgtTree

        public AcgtTree()
      • AcgtTree

        protected AcgtTree​(java.lang.String name,
                           AcgtTree parent)
    • Method Detail

      • base2index

        public static int base2index​(char base)
      • add

        public void add​(java.lang.String sequence)
      • entropy

        public double entropy()
        Calculate the entropy
      • entropyAll

        public java.util.List<java.lang.Double> entropyAll​(int thresholdCount)
      • findNodeNames

        public java.util.List<java.lang.String> findNodeNames​(double thresholdEntropy,
                                                              double thresholdP,
                                                              int thresholdCount)
        Find node names that are within the thresholds
      • get

        public AcgtTree get​(char base)
        Get a node
      • get

        public AcgtTree get​(java.lang.String bases)
        Get node indexed by this string
      • getOrCreate

        public AcgtTree getOrCreate​(char base)
        Get a node (create it if it doesn't exist)
      • getTotalCount

        public int getTotalCount()
      • inc

        public void inc​(char base)
        Increment counter for a base
      • pAll

        public java.util.List<java.lang.Double> pAll​(int thresholdCount)
      • pAll

        protected void pAll​(int thresholdCount,
                            java.util.List<java.lang.Double> ps)
      • seqConservation

        public double seqConservation()
      • set

        public void set​(char base,
                        AcgtTree n)
        Set a node
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(java.lang.String tabs,
                                         double thresholdEntropy,
                                         double thresholdP,
                                         int thresholdCount)