|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unibi.techfak.jpredictor.motifs.MotifSearchAdapter
abstract class MotifSearchAdapter
An abstract adapter class for searching motifs on a sequence.
This class implements the interface MotifSearcher and
from extending classes only search(int, int) must be
implemented.
MotifSearcher| Nested Class Summary | |
|---|---|
protected class |
MotifSearchAdapter.SearchFields
Holds data structures and fields relevant for searching motifs. |
| Field Summary | |
|---|---|
protected MotifSearchAdapter.SearchFields |
searchFields
The instance of the class holding relavant search data. |
| Fields inherited from interface de.unibi.techfak.jpredictor.motifs.MotifSearcher |
|---|
SEARCH_ALL_ORIENTATIONS, SEARCH_DIRECTION_MAX, SEARCH_DIRECTION_MINUS, SEARCH_DIRECTION_PLUS |
| Constructor Summary | |
|---|---|
MotifSearchAdapter()
|
|
| Method Summary | |
|---|---|
int |
getSearchMode()
The returned bit field holds a set bit if the appropriate search mode is used or a zero otherwise. |
int |
initSearch(java.lang.CharSequence sequ)
Inits the search by saving a reference on the search sequence. |
abstract int |
length()
The length of the motif is to return. |
java.util.LinkedList |
searchAll(int seqStart,
int seqWidth)
Runs through the sequence already given in the initialization method initSearch and matches the motif on that
CharSequence with respect to the search mode and the
sequence window. |
void |
setSearchMode(int searchMode)
Sets the mode how a motif is searched. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.unibi.techfak.jpredictor.motifs.MotifSearcher |
|---|
search |
| Field Detail |
|---|
protected MotifSearchAdapter.SearchFields searchFields
| Constructor Detail |
|---|
MotifSearchAdapter()
| Method Detail |
|---|
public abstract int length()
public int initSearch(java.lang.CharSequence sequ)
MotifSearchernull and the
search window, which is set to the maximum width.
initSearch in interface MotifSearchersequ - the sequence for all search methods to search on.
MotifSearcher.search(int, int),
MotifSearcher.searchAll(int, int)public int getSearchMode()
MotifSearcherSEARCH_DIRECTION_PLUS
, SEARCH_DIRECTION_MINUS, or
SEARCH_ALL_ORIENTATIONS. Use the IOTools.test(int,int)
to test for various bits.
getSearchMode in interface MotifSearcherMotifSearcher.setSearchMode(int),
MotifSearcher.SEARCH_DIRECTION_PLUS,
MotifSearcher.SEARCH_DIRECTION_MINUS,
MotifSearcher.SEARCH_ALL_ORIENTATIONS,
IOTools.test(int, int)
public void setSearchMode(int searchMode)
throws java.lang.IllegalArgumentException
MotifSearcher
SEARCH_DIRECTION_PLUS, SEARCH_DIRECTION_MINUS
or SEARCH_ALL_ORIENTATIONS as parameters.
setSearchMode in interface MotifSearchersearchMode - The search mode.
java.lang.IllegalArgumentException - If searchMode is
unknown.MotifSearcher.SEARCH_DIRECTION_PLUS,
MotifSearcher.SEARCH_DIRECTION_MINUS,
MotifSearcher.SEARCH_ALL_ORIENTATIONS
public java.util.LinkedList searchAll(int seqStart,
int seqWidth)
throws MissingCharSequenceException,
MissingMotifException
MotifSearcherinitSearch and matches the motif on that
CharSequence with respect to the search mode and the
sequence window.
A LinkedList of all occurances found is generated and returned.
That list is ordered. Every element in that list is of
FoundMotifStruct
searchAll in interface MotifSearcherseqStart - Search starts with this index.seqWidth - The width of the subsequence to search on.
FoundMotifStruct's of
all positions in the sequence' window, where the motif matches. If
the motif is a MultiMotif there is one struct per whole
match with the starting positions of all single motifs. The list is
empty, if no match was found.
MissingCharSequenceException - If no sequence to search on was
set previously.
MissingMotifException - If no motif to search for is set.MotifSearcher.initSearch(CharSequence),
MotifSearcher.search(int, int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||