public class ConservationICScorer extends GroupScorer
IC(m) = SUM_i( SUM_j( p_ij log_2 (p_ij/p_j) ))where i is a position in the weight matrix, and j is one of the 4 bases. Thus, each motif is turned into a
PWM
around the hamming
space HD provided in the constructor, and the relative entropy against the background base frequencies are computed.
This currently extends GroupScorer so it can be easily plugged into beam.
Scorer.ScoreSoftValueHashMap
Modifier and Type | Field and Description |
---|---|
protected int[] |
backgroundFrequencies
The background base frequencies in the motif finder.
|
static int |
DEFAULT_HD |
protected int |
HD
The hamming space around which to expand each motif.
|
static int |
WOC
The wildcard optimization cutoff used for the motif finders.
|
groupMF, separateMotifFinders
lookupCount, mf, motifScoreCache2, usePrior
Constructor and Description |
---|
ConservationICScorer(MotifFinder finder,
boolean discardOverlaps,
int hammingDistance)
Sets the motif finder and discardOverlaps parameters of the motif finder appropriately; hammingDistance determines the space into which
we will expand each motif.
|
ConservationICScorer(MotifFinder genomicFinder,
MotifFinder groupFinder,
boolean discardOverlaps)
For compatability with other Group Scorers; simply uses the groupFinder and the default
DEFAULT_HD . |
Modifier and Type | Method and Description |
---|---|
double |
calculateScore(Motif m)
The conservation of this motif as measured by the relative entropy of the PWM of this motif and it's neighbors around the given hamming
space against the background base distribution of the PWM.
|
double |
calculateScore(MotifList ml)
This method has not been implemented.
|
computePhi, computePhi, computePhi, getGenomicMotifFinder, getGroupCount, getGroupSize, getMotifFinder, setDiscardOverlaps, setMotifFinder, setSeparateMotifFinders
baseEntropy, computePrior, computePrior, getDiscardOverlaps, getLookupCount, getUsePrior, setScore, setScore, setScores, setScores, setUsePrior
public static final int DEFAULT_HD
public static final int WOC
protected int[] backgroundFrequencies
protected int HD
public ConservationICScorer(MotifFinder finder, boolean discardOverlaps, int hammingDistance)
public ConservationICScorer(MotifFinder genomicFinder, MotifFinder groupFinder, boolean discardOverlaps)
DEFAULT_HD
.public double calculateScore(Motif m)
calculateScore
in class Scorer
PWM.computeRelativeEntropy(int[])
public double calculateScore(MotifList ml)
calculateScore
in class Scorer
java.lang.IllegalArgumentException
- since this method has not been implemented.