public interface Emission extends Storable, Cloneable
State
Modifier and Type | Method and Description |
---|---|
void |
addToStatistic(boolean forward,
int startPos,
int endPos,
double weight,
Sequence seq)
This method adds the
weight to the internal sufficient statistic. |
void |
estimateFromStatistic()
This method estimates the parameters from the internal sufficient statistic.
|
AlphabetContainer |
getAlphabetContainer()
This method returns the
AlphabetContainer of this emission. |
double |
getLogPriorTerm()
Returns a value that is proportional to the log of the prior.
|
double |
getLogProbFor(boolean forward,
int startPos,
int endPos,
Sequence seq)
This method computes the logarithm of the likelihood.
|
String |
getNodeLabel(double weight,
String name,
NumberFormat nf)
Returns the graphviz label of the node containing this emission.
|
String |
getNodeShape(boolean forward)
Returns the graphviz string for the shape of the node.
|
void |
initializeFunctionRandomly()
This method initializes the emission randomly.
|
void |
joinStatistics(Emission... emissions)
This method joins the statistics of different instances and sets this joined statistic as statistic of each instance.
|
void |
resetStatistic()
This method resets the internal sufficient statistic.
|
void |
setParameters(Emission t)
Set values of parameters of the instance to the value of the parameters of the given instance.
|
String |
toString(NumberFormat nf)
This method returns a
String representation of the instance. |
AlphabetContainer getAlphabetContainer()
AlphabetContainer
of this emission.AlphabetContainer
of this emissionvoid initializeFunctionRandomly()
double getLogProbFor(boolean forward, int startPos, int endPos, Sequence seq) throws OperationNotSupportedException
forward
- whether to use the forward or the reverse strandstartPos
- the start positionendPos
- the end positionseq
- the sequenceOperationNotSupportedException
- if forward=false
and the reverse complement of the sequence seq
is not defineddouble getLogPriorTerm()
StatisticalModel.getLogPriorTerm()
void resetStatistic()
void addToStatistic(boolean forward, int startPos, int endPos, double weight, Sequence seq) throws OperationNotSupportedException
weight
to the internal sufficient statistic.forward
- whether to use the forward or the reverse strandstartPos
- the start positionendPos
- the end positionweight
- the weight of the sequenceseq
- the sequenceOperationNotSupportedException
- if forward=false
and the reverse complement of the sequence seq
is not definedvoid joinStatistics(Emission... emissions)
emissions
- the emissions to be joinedvoid estimateFromStatistic()
String getNodeShape(boolean forward)
forward
- if this emission is used on the forward strandString getNodeLabel(double weight, String name, NumberFormat nf)
weight
- the weight of the node which is represented by
the color of the node, or -1 for no representation, i.e.,
white backgroundname
- the name of the state using this emissionnf
- the NumberFormat
for formatting the textual representation of this emissionvoid setParameters(Emission t) throws IllegalArgumentException
t
- the emission with the parameters to be setIllegalArgumentException
- if the assumption about the same class for given and current instance is wrongString toString(NumberFormat nf)
String
representation of the instance.nf
- the NumberFormat
for the String
representation of parameters or probabilitiesString
representation of the instance