Package org.snpeff.spliceSites
Class AcgtTree
- java.lang.Object
-
- org.snpeff.spliceSites.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
-
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 entropyjava.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 thresholdsAcgtTree
get(char base)
Get a nodeAcgtTree
get(java.lang.String bases)
Get node indexed by this stringAcgtTree
getOrCreate(char base)
Get a node (create it if it doesn't exist)int
getTotalCount()
void
inc(char base)
Increment counter for a basejava.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 nodejava.lang.String
toString()
java.lang.String
toString(java.lang.String tabs, double thresholdEntropy, double thresholdP, int thresholdCount)
-
-
-
Field Detail
-
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 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 classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String tabs, double thresholdEntropy, double thresholdP, int thresholdCount)
-
-