# Class AcgtTree

java.lang.Object
org.snpeff.spliceSites.AcgtTree

public class AcgtTree extends Object
ACGT tree

Author:
  pcingola

## Field Summary

Fields
Modifier and Type
Field
Description
`static final char[]`
`BASES`
`static final int`
`FAKE_COUNTS`
`static final double`
`LOG2`
`static final double`
`MAX_ENTROPY`

## Constructor Summary

Constructors
Modifier
Constructor
Description
``
`AcgtTree()`
`protected`
`AcgtTree(String name, AcgtTree parent)`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(String sequence)`
`static int`
`base2index(char base)`
`double`
`entropy()`
Calculate the entropy
`List<Double>`
`entropyAll(int thresholdCount)`
`List<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(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
`List<Double>`
`pAll(int thresholdCount)`
`protected void`
`pAll(int thresholdCount, List<Double> ps)`
`double`
`seqConservation()`
`void`
`set(char base, AcgtTree n)`
Set a node
`String`
`toString()`
`String`
`toString(String tabs, double thresholdEntropy, double thresholdP, int thresholdCount)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### BASES

public static final char[] BASES

### LOG2

public static final double LOG2

### FAKE_COUNTS

public static final int FAKE_COUNTS

See Also:
  - Constant Field Values

### MAX_ENTROPY

public static final double MAX_ENTROPY

See Also:
  - Constant Field Values

## Constructor Details

### AcgtTree

public AcgtTree()

### AcgtTree

protected AcgtTree(String name, AcgtTree parent)

## Method Details

### base2index

public static int base2index(char base)

### add

public void add(String sequence)

### entropy

public double entropy()
Calculate the entropy

### entropyAll

public List<Double> entropyAll(int thresholdCount)

### findNodeNames

public List<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(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 List<Double> pAll(int thresholdCount)

### pAll

protected void pAll(int thresholdCount, List<Double> ps)

### seqConservation

public double seqConservation()

### set

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

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### toString

public String toString(String tabs, double thresholdEntropy, double thresholdP, int thresholdCount)