public interface MutableMotifDiscoverer extends MotifDiscoverer
Mutable
MotifDiscoverer.KindOfProfile
Modifier and Type | Method and Description |
---|---|
void |
adjustHiddenParameters(int index,
DataSet[] data,
double[][] weights)
Adjusts all hidden parameters including duration and mixture parameters according to the current values of the remaining parameters.
|
void |
initializeMotif(int motifIndex,
DataSet data,
double[] weights)
This method allows to initialize the model of a motif manually using a weighted data set.
|
void |
initializeMotifRandomly(int motif)
This method initializes the motif with index
motif randomly using for instance DifferentiableSequenceScore.initializeFunctionRandomly(boolean) . |
boolean |
modifyMotif(int motifIndex,
int offsetLeft,
int offsetRight)
Manually modifies the motif model with index
motifIndex . |
clone, getGlobalIndexOfMotifInComponent, getIndexOfMaximalComponentFor, getMotifLength, getNumberOfComponents, getNumberOfMotifs, getNumberOfMotifsInComponent, getProfileOfScoresFor, getStrandProbabilitiesFor
boolean modifyMotif(int motifIndex, int offsetLeft, int offsetRight) throws Exception
motifIndex
. The two offsets offsetLeft
and offsetRight
define how many positions the left or right border positions shall be moved. Negative numbers indicate moves to the left while positive
numbers correspond to moves to the right. The distribution for sequences to the left and right side of the motif shall be computed internally.motifIndex
- the index of the motif in the motif discovereroffsetLeft
- the offset on the left sideoffsetRight
- the offset on the right sidetrue
if the motif model was modified otherwise false
Exception
- if some unexpected error occurred during the modificationmodifyMotif(int, int, int)
,
Mutable.modify(int, int)
void initializeMotif(int motifIndex, DataSet data, double[] weights) throws Exception
motifIndex
- the index of the motif in the motif discovererdata
- the data set of sequencesweights
- either null
or an array of length data.getNumberofElements()
with non-negative weights.Exception
- if initialize was not possiblevoid initializeMotifRandomly(int motif) throws Exception
motif
randomly using for instance DifferentiableSequenceScore.initializeFunctionRandomly(boolean)
.
Furthermore, if available, it also initializes the positional distribution.motif
- the index of the motifException
- either if the index is wrong or if it is thrown by the method DifferentiableSequenceScore.initializeFunctionRandomly(boolean)
void adjustHiddenParameters(int index, DataSet[] data, double[][] weights) throws Exception
index
- the index of the class of this MutableMotifDiscoverer
data
- the array of data for all classesweights
- the weights for all sequences in dataException
- thrown if the hidden parameters could not be adjusted