de.unibi.techfak.jpredictor.motifs
Interface SequenceWindowScorer

All Superinterfaces:
MotifSearcher
All Known Implementing Classes:
DoubleMotif, Motif, MultiMotif, PSPMotif, PSSMotif, RegularExpressionMotif, SequenceMotif

interface SequenceWindowScorer
extends MotifSearcher

The Interface SequenceWindowScorer should be implemented by classes that wants to support scoring in any kind.
Note, that scoring can only be done using the found motifs (on a sequence), so you should implement the Interface MotifSearcher as well.


Field Summary
 
Fields inherited from interface de.unibi.techfak.jpredictor.motifs.MotifSearcher
SEARCH_ALL_ORIENTATIONS, SEARCH_DIRECTION_MAX, SEARCH_DIRECTION_MINUS, SEARCH_DIRECTION_PLUS
 
Method Summary
 double getWeight()
          Gets the previously set weight or Double.NaN.
 double scoreSequenceWindow(int seqStart, int seqLength)
          Scores a sequence window.
 void setWeight(double weight)
          Sets the weight for the motif.
 
Methods inherited from interface de.unibi.techfak.jpredictor.motifs.MotifSearcher
getSearchMode, initSearch, search, searchAll, setSearchMode
 

Method Detail

getWeight

double getWeight()
Gets the previously set weight or Double.NaN.

Returns:
The weight of the motif or Double.NaN, if the weight was not set yet.

setWeight

void setWeight(double weight)
               throws MotifNotCompleteException
Sets the weight for the motif. The weight is not set, if the motif is not proper initialized, as it is the case for MultiMotifs.

Parameters:
weight - The new weight to set.
Throws:
MotifNotCompleteException - If the motif was not completely defined yet.

scoreSequenceWindow

double scoreSequenceWindow(int seqStart,
                           int seqLength)
Scores a sequence window. First, the motif is searched and the number of findings is multiplied with the weight given for that motif.

Parameters:
seqStart - The start point on the CharSequence.
seqLength - The length of the window on the CharSequence.
Returns:
A number representing the score, or Double.NaN in case of error or if the score was not yet set.
See Also:
MotifSearcher.search(int, int), MotifSearcher.searchAll(int, int)