|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unibi.techfak.jpredictor.clustering.RelationMeasure
de.unibi.techfak.jpredictor.clustering.MotifAlignment
public abstract class MotifAlignment
Class for generell alignment between two or more motifs. Since it should only be possible to align single motifs against each other and to align two multi motifs with the same length against each other, subsequent classes must provide methods to make sure of that.
Every alignment relies on a MatrixAlignment which must be
given. It is used to align single motifs against each other. The method
result() returns the optimal similarity/distance/likelyhood
or whatever relation measure is given only after a full computation was
done. Intermediate results can be obtained using
| Field Summary | |
|---|---|
(package private) MotifList |
ml
The list of motifs to be aligned. |
(package private) int[] |
motifOrientation
Stores the orientation of the motifs aligned after the alignment was computed. |
| Fields inherited from class de.unibi.techfak.jpredictor.clustering.RelationMeasure |
|---|
computationResult |
| Fields inherited from interface de.unibi.techfak.jpredictor.clustering.Computable |
|---|
COMPUTATION_FAILED, COMPUTATION_PENDING, COMPUTATION_SUCCESS, COMPUTATION_WAITING |
| Constructor Summary | |
|---|---|
MotifAlignment()
|
|
| Method Summary | |
|---|---|
abstract boolean |
add(Motif m)
Adds a motif to this alignment class. |
void |
clear()
Clears the list of motifs this class contains. |
Motif |
consensus()
Calculates the consensus motif over the last two aligned ones. |
abstract Motif |
consensus(int normX,
int normY)
Calculates the consensus motif over the last two given ones, after they were properly aligned. |
int |
getOrientation(int motifNumber)
Returns the orientation for the motifs. |
| Methods inherited from class de.unibi.techfak.jpredictor.clustering.RelationMeasure |
|---|
atomicCombine, atomicCombine, atomicNormalize, compareTo, newInstance, optimum, optimum, result, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.unibi.techfak.jpredictor.clustering.Computable |
|---|
compute |
| Field Detail |
|---|
MotifList ml
int[] motifOrientation
getOrientation(int)
. Zero values indicate that nothing was computed yet, valid
return values are MotifSearcher.SEARCH_DIRECTION_PLUS
and MotifSearcher.SEARCH_DIRECTION_MINUS.
getOrientation(int),
MotifSearcher.SEARCH_DIRECTION_PLUS,
MotifSearcher.SEARCH_DIRECTION_MINUS| Constructor Detail |
|---|
public MotifAlignment()
| Method Detail |
|---|
public abstract boolean add(Motif m)
Adds a motif to this alignment class. The motif is always appent to the existing motifs. Depending on the used alignment class other motifs are accepted.
It is recommended that implementing classes should not perform any
time consuming operations here, but rather doing them in the
compute() method.
m - The motif to appent to the list.
true, if the motif was added, false
otherwise, e.g. if the motif did not met the constraint,
maybe a MultiMotif was given, where a single one
was expected, or vice versa.MultiMotif,
SequenceMotif,
PSPMotifpublic void clear()
compute() will fail, nevertheless,
previously computed results will not be cleared.
public int getOrientation(int motifNumber)
throws java.lang.IndexOutOfBoundsException
MotifSearcher.SEARCH_DIRECTION_PLUS and
MotifSearcher.SEARCH_DIRECTION_MINUS. Zero values mean
that the alignment was not yet computed or is not yet finished.
motifNumber - The index of the motifs as they were added to this
class. If the class aligns only two motifs valid indices are zero and
one, since only the last two added motifs are aligned.
java.lang.IndexOutOfBoundsException - If motifNumber is less
than zero or greater or equal the number of motifs aligned.MotifSearcher.SEARCH_DIRECTION_PLUS,
MotifSearcher.SEARCH_DIRECTION_MINUS
public abstract Motif consensus(int normX,
int normY)
Calculates the consensus motif over the last two given ones, after they were properly aligned. Note that this method is not fail-save, since it may mix up newly added motifs with an alignment made on two motifs previously added. It depends on the implementing classes what type the returned motif is (PSPMotif or MultiMotif). The name of the returned motif is normally a combination of the two original motifs names.
The orientation (searchDirection) is copied from the motif added earlier.
normX - The normalization for the first motif.normY - The normalization for the second motif.
public Motif consensus()
this.consensus(1,1).
consensus(int, int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||