public abstract class Scorer
extends java.lang.Object
public double calculateScore(Motif m) public double calculateScore(MotifList ml)
Modifier and Type | Class and Description |
---|---|
class |
Scorer.ScoreSoftValueHashMap |
Modifier and Type | Field and Description |
---|---|
protected int |
lookupCount |
protected MotifFinder |
mf |
protected SoftValueHashMap<Motif,java.lang.Double> |
motifScoreCache2 |
protected boolean |
usePrior |
Modifier | Constructor and Description |
---|---|
protected |
Scorer(MotifFinder finder,
boolean discardOverlaps,
int wildcardOptimizationCutoff)
Sets the motif finder and tells it whether or not to discard overlaps and what wildcard optimization cutoff to use-- sets usePrior to
true.
|
Modifier and Type | Method and Description |
---|---|
static double |
baseEntropy(char c,
Alphabet alf) |
abstract double |
calculateScore(Motif m)
Returns the score of m and increments the lookupCount.
|
abstract double |
calculateScore(MotifList ml)
Returns the score of ml and increments the lookupCount.
|
double |
computePhi(MotifList m1,
MotifList m2)
Calculates a phi score for a pair of motifs.
|
double |
computePhi(Motif m1,
Motif m2)
Calculates a phi score for a pair of motifs.
|
double |
computePhi(Motif m1,
MotifList m2) |
double |
computePrior(Motif m)
Returns the natural log of a Bayesian prior derived from a Bonferoni correction.
|
double |
computePrior(MotifList ml)
Returns the average prior of all the motifs in ml; no checks are made for duplicate motifs.
|
private static double |
computeScalingFactor(Motif m)
Returns the number of possible motif sequences with the same length as m.
|
boolean |
getDiscardOverlaps() |
int |
getLookupCount()
Returns the number of times calculateScore has been called.
|
MotifFinder |
getMotifFinder() |
boolean |
getUsePrior() |
void |
setDiscardOverlaps(boolean b)
Sets the discardOverlaps value of the internal motif finders.
|
void |
setMotifFinder(MotifFinder mf)
Sets this motif finder to the given motif finder.
|
double |
setScore(Motif m)
Calculates m's score and sets it.
|
double |
setScore(MotifList ml)
Calculates m's score and sets it.
|
void |
setScores(Motif[] m)
Calculates and sets the scores for an array of motifs.
|
void |
setScores(MotifList[] ml)
Calculates and sets the scores for an array of motif lists.
|
void |
setUsePrior(boolean b)
Sets whether or not Bayesian priors are used.
|
protected int lookupCount
protected MotifFinder mf
protected final SoftValueHashMap<Motif,java.lang.Double> motifScoreCache2
protected boolean usePrior
protected Scorer(MotifFinder finder, boolean discardOverlaps, int wildcardOptimizationCutoff)
public static double baseEntropy(char c, Alphabet alf)
private static double computeScalingFactor(Motif m)
public abstract double calculateScore(Motif m)
public abstract double calculateScore(MotifList ml)
public double computePhi(Motif m1, Motif m2)
public double computePhi(MotifList m1, MotifList m2)
public double computePrior(Motif m)
public double computePrior(MotifList ml)
public boolean getDiscardOverlaps()
public int getLookupCount()
public MotifFinder getMotifFinder()
public boolean getUsePrior()
public void setDiscardOverlaps(boolean b)
public void setMotifFinder(MotifFinder mf)
public final double setScore(Motif m)
public final double setScore(MotifList ml)
public final void setScores(Motif[] m)
public final void setScores(MotifList[] ml)
public void setUsePrior(boolean b)