|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IOperator
In this interface methods are defined, that an operator acting on motifs and sequences should implement.
The operator's method will get their options and parameters from
a class implementing the interface Communicator.
Note, that the operator's actions should work in threads, and
that results should be sequently delivered to the calling process
by using the communicators methods.
| Method Summary | |
|---|---|
long |
getSequenceLength(int seqNr)
While searching or scoring the length of every searched sequence can be obtained. |
java.lang.String |
getSequenceName(int seqNr)
While searching or scoring the name of every searched sequence can be obtained. |
int |
getSequenceNumber()
After searching or scoring the number of sequences that has gone through can be obtained with this method. |
java.lang.String |
scoreSequence()
A sequence is window-by-window scored by summing-up the motifs weigths. |
java.lang.String |
searchMotifs(boolean count)
Search for motifs on a sequence. |
java.lang.String |
weightMotifs()
Weight motifs by searching them on two training sets. |
| Method Detail |
|---|
int getSequenceNumber()
String, than 7 is
returned.
long getSequenceLength(int seqNr)
getSequenceNumber() the total length over all sequences
is calculated and returned.
seqNr - The sequence thats length is of interest.
java.lang.String getSequenceName(int seqNr)
getSequenceNumber() null is returned.
seqNr - The sequence whos name is of interest.
null,
if seqNr is out of range.java.lang.String searchMotifs(boolean count)
MotifList
and the information about the sequence are taken from the
Communicator this operater was initialized with. The
search is done using the sequence window that is shifted on the
sequence.
count=false
for every occurrence one FoundMotifStruct is output,
which id gives the motif's number in the list. Note,
that the findings are ordered first by position and than by id.
If count=true the occurrences are counted for the motifs.
After every searched sequence a FoundMotifStruct is output
with id=motifNumber and start[0]=occurrences.
Note, that the occurrences are output in order the motifs are arranged
in the motif list.
FoundMotifStruct
with id=-1 and start[0]=0 is
output. If the search is all done, a FoundMotifStruct
with id=-1 and start[0]=-1 is output.
count - false if all occurrences should be sent to
the communicator, true if they are counted for every
motif.
null iff the search was initiated,
otherwise a String with the error number followed by a short
explaination, why the search could not be started.java.lang.String weightMotifs()
MotifList and the sequence informations are
taken from the Communicator this operater was
initialized with. The motifs are searched first on the sequences
of the positive training set and afterwards on the sequences of the
negative training sets. Both training sets are taken from the
Communicator. The sequences are searched as a whole,
thus windowWidth and windowShift are
not needed.MotifList.setScores(MotifList, Vector[], Vector[]) is
taken for calculation, after a required sequence normalization is done.
Communicator is the
following: first, for every motif the occurrences (as Integer
) on the sequences of the positive training set is sent,
followed by a -1.
Second, the same for the negative training set is done. The last
number sent is the return value of the method
Motif.setScores(MotifList, Vector[], Vector[]), which
shows whether calculation was successful or not. The motif's scores
are stored in the motifs and can be read using getScore().
null iff the calculation was initiated,
otherwise a String with the error number followed by a short
explaination, why the calculation could not be started.MotifList.setScores(Vector[], Vector[]),
Motif.getWeight()java.lang.String scoreSequence()
MotifList and the sequence information are
taken from the Communicator this operater was
initialized with. The sequence given can be either a file (e.g.
FASTA-format) or a CharSequence. Searching is done by
shifting a window of defined width on the sequence. These sequence
windows are scored by summing up the weights of found motifs within
the window.ScoredSequenceStruct-object is sent
to the communicator, which holds the sequence number, the start and
end of the sequence and the corresponding score. ScoredSequenceStruct-object with -1 as sequence number.
null iff scoring was initiated,
otherwise a String with the error number followed by a short
explaination, why the scoring could not be started.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||