|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unibi.techfak.jpredictor.motifs.FoundMotifStruct
public class FoundMotifStruct
Class for holding the results when searching through the operator.
If toString() is called, a String of the
appearance "id:start[0]-end[0]:start[1]-end[1]:..." is returned.
| Field Summary | |
|---|---|
int[] |
end
The end of the found motifs on the sequence. |
int |
id
The id of the result, that is the motif number in the list. |
int[] |
start
The start of the found motifs on the sequence. |
| Constructor Summary | |
|---|---|
FoundMotifStruct(int[] start)
This constructor sets the id to zero and end to null. |
|
FoundMotifStruct(int[] start,
int[] end)
This constructor sets the id to zero and calls this(0, start, end). |
|
FoundMotifStruct(int id,
int start)
Give for a motif the id and its start. |
|
FoundMotifStruct(int id,
int[] startend)
Give the id and occurrences of all motifs of a MultiMotif. |
|
FoundMotifStruct(int id,
int[] start,
int[] end)
Give the id and occurrences of all motifs of a MultiMotif. |
|
FoundMotifStruct(int id,
int start,
int end)
Give for a motif the id, its start and end on the sequence. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object arg)
Compares this class to another one of the same type. |
int |
end()
Calculates the maximal end position of the motif. |
int |
getOccurrence(int index)
Gets the occurrence of the motif with the given index. |
int |
length()
Calculates the length of the motif. |
int |
start()
Calculates the minimal start position of the motif. |
java.lang.String |
toString()
Generates a representation of the occurrence. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int id
public int[] start
start>end the motif was found reversed
complementary.
public int[] end
end<start the motif was found reversed
complementary.
| Constructor Detail |
|---|
public FoundMotifStruct(int id,
int start)
id - The id of the motif whos found index is stored.start - Start of the motif on the sequence.
public FoundMotifStruct(int id,
int start,
int end)
id - The id of the motif whos found index is stored.start - Start of the motif on the sequence.end - End of the motif on the sequence.
public FoundMotifStruct(int id,
int[] start,
int[] end)
throws java.lang.NullPointerException
MultiMotif.
With this method all motifs comprised in a MultiMotif
have their own start and end point which are stored.
MultiMotif and not of the
single motifs within. If it is irrelevant, set it to zero.
end
may be null, start must not. Both arrays
need to have the same size, otherwise the lesser length is taken
for cloning both arrays.
id - The id of the motif whos found index is stored.start - Array of start points of all motifs on the sequence.end - Array of end points of all motifs on the sequence.
java.lang.NullPointerException - If start==null.
public FoundMotifStruct(int id,
int[] startend)
throws java.lang.NullPointerException
MultiMotif.
The given array has all start and end positions of the motifs in it:
[ start1, end1, start2, end2, ..., start_N, end_N ]. The total length must therefore be even, and greater zero. If the length is odd, the last index is ignored.
id - The id of the motif whos occurrence is to be stored.startend - Array of start-end-occurrences of all motifs on the
sequence.
java.lang.NullPointerException - If startend==null.
public FoundMotifStruct(int[] start,
int[] end)
throws java.lang.NullPointerException
this(0, start, end).
start - Array of start points of all motifs on the sequence.end - Array of end points of all motifs on the sequence.
java.lang.NullPointerException - If start==null.
public FoundMotifStruct(int[] start)
throws java.lang.NullPointerException
null.
It simply calls this(0, start, null).
start - Array of start-occurrences of all motifs on the
sequence.
java.lang.NullPointerException - If start==null.| Method Detail |
|---|
public int compareTo(java.lang.Object arg)
this class to another one of the same type.
Returns zero, iff all data types stored are of the same content,
-1, iff this is less and 1 if this is
greater than arg.
this contains
more occurrences, 1 is returned; if args contains more,
-1 is returned. Last the id's are compared. Only if
they are equal, the two FoundMotifStruct's are equal.
compareTo in interface java.lang.Comparablearg - Another FoundMotifStruct this one is compared
to. Throws a ClassCastException, if arg is
of the wrong type.Comparable.compareTo(java.lang.Object)public java.lang.String toString()
id, and than the occurrences "start-end" all
seperated by a colon. If this.end==null "-end" is
left out.
toString in class java.lang.ObjectObject.toString()public java.lang.Object clone()
clone in class java.lang.Object
public int getOccurrence(int index)
throws java.lang.ArrayIndexOutOfBoundsException
index.
If end is less than start for this motifs
occurrence, than -end is returned, otherwise
start.
index - The index within the arrays (in other words, the index
of the motif within the MultiMotif).
java.lang.ArrayIndexOutOfBoundsException - If index is not
within the occurrency arrays.public int length()
end()-start()+1. Thus, 1 is returned if only start was given while constructing this class.
start(),
end()public int start()
Math.min( start[0], end[0] ). If no end array was given during construction
start[0]
is returned.
public int end()
Math.max(start[len-1], end[len-1]). If no end array was given during construction
start[len-1]
is returned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||