Package org.snpeff.spliceSites
Class AcgtTree
- java.lang.Object
-
- org.snpeff.spliceSites.AcgtTree
-
public class AcgtTree extends java.lang.ObjectACGT tree- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description static char[]BASESstatic intFAKE_COUNTSstatic doubleLOG2static doubleMAX_ENTROPY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String sequence)static intbase2index(char base)doubleentropy()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 thresholdsAcgtTreeget(char base)Get a nodeAcgtTreeget(java.lang.String bases)Get node indexed by this stringAcgtTreegetOrCreate(char base)Get a node (create it if it doesn't exist)intgetTotalCount()voidinc(char base)Increment counter for a basejava.util.List<java.lang.Double>pAll(int thresholdCount)protected voidpAll(int thresholdCount, java.util.List<java.lang.Double> ps)doubleseqConservation()voidset(char base, AcgtTree n)Set a nodejava.lang.StringtoString()java.lang.StringtoString(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:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String tabs, double thresholdEntropy, double thresholdP, int thresholdCount)
-
-