public class MaximalMatcher
extends java.lang.Object
This is primarily used for phi scoring. The computPhi
method will create an
instance of MaximalMatcher and compute the phi score.
Modifier and Type | Field and Description |
---|---|
private java.util.List<Range> |
arr1 |
private java.util.List<Range> |
arr2 |
private java.util.List<Range> |
foundResult |
private static int |
INIT_SIZE |
private java.util.List<Range> |
knownResult |
Constructor and Description |
---|
MaximalMatcher(MotifList foundList,
MotifList knownList,
MotifFinder mf)
Creates two sets of overlapping islands from the instances of m1 and m2 as given by mf.
|
MaximalMatcher(Motif found,
MotifList known,
MotifFinder finder)
Wraps the motifs in two Motif Lists and sends them on to
MaximalMatcher(MotifList, MotifList, MotifFinder) . |
MaximalMatcher(Motif found,
Motif known,
MotifFinder finder)
Wraps the motifs in two Motif Lists and sends them on to
MaximalMatcher(MotifList, MotifList, MotifFinder) . |
Modifier and Type | Method and Description |
---|---|
double |
computePhi()
Computes a phi score for the given motifs as their occurrences are described by the Motif Finder.
|
static double |
computePhi(MotifList m1,
MotifList m2,
MotifFinder mf)
Computes a phi score for the given motifs lists as their occurrences are described by the Motif Finder.
|
private void |
generateIslands()
Sets foundResult and knownResult to the results of running generateIslands(arr) on arr1 and arr2.
|
private java.util.List<Range> |
generateIslands(java.util.List<Range> arr)
Returns a list of islands from arr.
|
double |
getFN()
Caclulates the false negative rate, defined as 1 - intersection / total number of known bases.
|
double |
getFP()
Caclulates the false negative rate, defined as 1 - intersection / total number of found bases.
|
private static Range |
mergeRanges(java.util.List<Range> arr,
Range partition)
Returns a range that represents the full range of the given partition.
|
private int |
numBases(java.util.List<Range> arr)
Returns the number of bases in non-overlapping motifs.
|
private static int |
partition(java.util.List<Range> list,
int start)
Returns a pointer q to the end of the island in list beginning at start.
|
private int |
sharedBases()
Returns the total number of shared bases between foundResult and knownResult.
|
java.lang.String |
toString()
Prints the two sets of input ranges as e1 [tab] e2 where e1 and e2 are range elements from either arr1 or arr2, which are sorted.
|
private static final int INIT_SIZE
private final java.util.List<Range> arr1
private final java.util.List<Range> arr2
private java.util.List<Range> foundResult
private java.util.List<Range> knownResult
public MaximalMatcher(Motif found, Motif known, MotifFinder finder)
MaximalMatcher(MotifList, MotifList, MotifFinder)
.public MaximalMatcher(Motif found, MotifList known, MotifFinder finder)
MaximalMatcher(MotifList, MotifList, MotifFinder)
.public MaximalMatcher(MotifList foundList, MotifList knownList, MotifFinder mf)
public static double computePhi(MotifList m1, MotifList m2, MotifFinder mf)
private static Range mergeRanges(java.util.List<Range> arr, Range partition)
private static int partition(java.util.List<Range> list, int start)
public double computePhi()
private void generateIslands()
private java.util.List<Range> generateIslands(java.util.List<Range> arr)
public double getFN()
public double getFP()
private int numBases(java.util.List<Range> arr)
private int sharedBases()
public java.lang.String toString()
toString
in class java.lang.Object