MotifFinder
is an abstract class that defines most
of the functionality needed by motif finders. Subclasses need only
define how to search a string for specific substrings. This is currently
done by SuffixArrayMotifFinder
using an edu.dartmouth.bglab.util.SuffixArray
to quickly look up substrings.
Motif finders can be created dynamically using reflection by using the {@link edu.dartmouth.bglab.search.MotifFinderFactory} class. In order for a new motif finder to work with this factory, it must implement the constructors:
<ClassName>(String, int) <ClassName>(String, String, int)This can usually be done with simple calls to
super
.
GroupScorers maintain a notion of group and genome, or
background. At the top level, the only difference is in the constructor,
which takes two Motif Finders, one for the group and one for the genome.
Several of the utility methods are overridden by GroupScorer
to use the group-based Motif Finder. For example, the phi score methods
use the group Motif Finder to compute the phi score, and getMotifFinder()
and setMotifFinder()
work with the group Motif Finder. To
compensate for this, methods exist to get and set the genomic Motif
Finder.
Finally, {@link edu.dartmouth.bglab.search.SearchUtils} provides
additional search functionality, {@link
edu.dartmouth.bglab.search.MarkovModel} provides a Markov model version
of a motif finder.