de.unibi.techfak.jpredictor.motifs
Class DoubleMotif
java.lang.Object
de.unibi.techfak.jpredictor.motifs.MotifSearchAdapter
de.unibi.techfak.jpredictor.motifs.Motif
de.unibi.techfak.jpredictor.motifs.MultiMotif
de.unibi.techfak.jpredictor.motifs.DoubleMotif
- All Implemented Interfaces:
- MotifSearcher, SequenceWindowScorer, Markable, java.lang.Cloneable, java.lang.Comparable
public class DoubleMotif
- extends MultiMotif
Class for defining a special MultiMotif - only two motifs are comprised
within this motif, furthermore the distances between them and a score.
|
Constructor Summary |
DoubleMotif(java.lang.String name,
Motif motif1,
int minDistance,
int maxDistance,
Motif motif2,
double weight)
Creates a double motif by extending a MultiMotif. |
|
Method Summary |
static MotifList |
createDoubleMotifs(MotifList motifs,
ICommunicator comm,
boolean permutations,
boolean self)
Evaluates the distanceMode got from the
ICommunicator-interface and then creates
the DoubleMotifs with the distances. |
static MotifList |
createDoubleMotifs(MotifList motifs,
int minDist,
int maxDist,
boolean permutations,
boolean self)
Creates a list of DoubleMotifs from the single motifs
of the given MotifList. |
| Methods inherited from class de.unibi.techfak.jpredictor.motifs.MultiMotif |
add, add, checkMultiMotif, checkMultiMotifForCycles, clone, compareTo, createReversedComplement, getDistances, getMotif, getMotifs, getRegularExpression, initSearch, length, print, replaceMotif, search, searchAll, searchChoose, testDist, testDistRevComp |
| Methods inherited from class de.unibi.techfak.jpredictor.motifs.Motif |
clearMark, clearMark, equals, getConsensusSequence, getDescription, getMark, getName, getWeight, isMarked, isMarked, print, scoreSequenceWindow, setDescription, setMark, setName, setWeight, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DoubleMotif
public DoubleMotif(java.lang.String name,
Motif motif1,
int minDistance,
int maxDistance,
Motif motif2,
double weight)
- Creates a double motif by extending a
MultiMotif.
- Parameters:
name - The name of the double motif.motif1 - The first motif in the DoubleMotif.minDistance - The minimal distance between the two motifs.maxDistance - The maximal distance between the two motifs.motif2 - The second motif in the DoubleMotif.weight - The weight of the double motif.
createDoubleMotifs
public static MotifList createDoubleMotifs(MotifList motifs,
ICommunicator comm,
boolean permutations,
boolean self)
throws java.lang.NullPointerException
- Evaluates the
distanceMode got from the
ICommunicator-interface and then creates
the DoubleMotifs with the distances.
- Parameters:
motifs - A list of single motifs to create
DoubleMotifs from.comm - The ICommunicator.permutations - Permit or forbid permutations of motif pairs.self - Permit or forbid self pairing.
- Returns:
- A MotifList of pairs of single motifs, but
null,
if no motif is in the given MotifList.
- Throws:
java.lang.NullPointerException - If motifs is null.- See Also:
createDoubleMotifs(MotifList,int,int,boolean,boolean)
createDoubleMotifs
public static MotifList createDoubleMotifs(MotifList motifs,
int minDist,
int maxDist,
boolean permutations,
boolean self)
throws java.lang.NullPointerException
Creates a list of DoubleMotifs from the single motifs
of the given MotifList. Every motif pair has a distance
range from minDist to maxDist.
If parameter permutations is true every
possible motif pair is build, e.g. A-B as well as B-A. If it is
false motif pair A-B is build but not B-A.
If self is true, motifs are paired with
itself, e.g. A-A.
The score of every new DoubleMotif is set to
Double.NaN. The name is set to
"nameA-(minDist,maxDist)-nameB".
No description is set.
- Parameters:
motifs - A list of single motifs to build pairs from.minDist - The minimal distance between two single motifs.maxDist - The maximal distance between two single motifs.permutations - Permit or forbid permutations of motif pairs.self - Permit or forbid self pairing.
- Returns:
- A MotifList of pairs of single motifs, or
null,
if no motif is in the given MotifList.
- Throws:
java.lang.NullPointerException - If motifs is null.