Interface EmissionState
-
- All Superinterfaces:
Annotatable
,AtomicSymbol
,BasisSymbol
,Changeable
,State
,Symbol
,Trainable
- All Known Implementing Classes:
MagicalState
,ProfileEmissionState
,SimpleEmissionState
public interface EmissionState extends State, Trainable, Changeable
A state in a markov process that has an emission spectrum.
These states have an associated Distribution. Within an HMM, these are the states that actualy make your observed sequence. They also must supply training behaviour to set the emission spectrum up.
- Author:
- Matthew Pocock
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
Annotatable.AnnotationForwarder
-
-
Field Summary
Fields Modifier and Type Field Description static ChangeType
ADVANCE
This signals that the advance array has been altered.static ChangeType
DISTRIBUTION
This signals that the distribution associate with an EmissionState has been altered.-
Fields inherited from interface org.biojava.bio.Annotatable
ANNOTATION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int[]
getAdvance()
Determine the number of symbols this state advances along one or more symbol lists.Distribution
getDistribution()
Get the Distribution associated with this state.void
setAdvance(int[] advance)
Set the advance array.void
setDistribution(Distribution dis)
Set the Distribution associated with this state.-
Methods inherited from interface org.biojava.bio.Annotatable
getAnnotation
-
Methods inherited from interface org.biojava.bio.symbol.BasisSymbol
getSymbols
-
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Methods inherited from interface org.biojava.bio.symbol.Symbol
getMatches, getName
-
Methods inherited from interface org.biojava.bio.dp.Trainable
registerWithTrainer
-
-
-
-
Field Detail
-
DISTRIBUTION
static final ChangeType DISTRIBUTION
This signals that the distribution associate with an EmissionState has been altered.
If the distribution has changed its weights, then the event'e getChainedEvent method will return the event fired by the distribution. If one distribution has been replaced by another, then the new and old Distributions will be in current and previous, respectively.
-
ADVANCE
static final ChangeType ADVANCE
This signals that the advance array has been altered.
current and previous should hold the current and previous advances, respectively.
-
-
Method Detail
-
getAdvance
int[] getAdvance()
Determine the number of symbols this state advances along one or more symbol lists. In the simple case, this method should almost always return {1} if it is a true `emmision' state, or {0} if it is a dot state which only emits a gap character. For pairwise HMMs, it will normally return {1, 1} for match state, and {0, 1} or {1, 0} for a gap state. Under some circumstances it may be valid to return values other than 1 or 0, but you should consider the consequences for HMM architecture very carefully, and contact the authors. Developers may wish to return a copy of some underlying array from this method as code outside could modify the array you give
-
setAdvance
void setAdvance(int[] advance) throws ChangeVetoException
Set the advance array.- Parameters:
advance
- an array of ints, specifying how many symbols are consumed from each sequence- Throws:
ChangeVetoException
- if the implementation doesn't support setting advance, or if the change is vetoed
-
getDistribution
Distribution getDistribution()
Get the Distribution associated with this state.
If the state is to be added to an HMM, then the state's emission spectrum must be compatible with the HMM - that is, their emission alphabets must match.
- Returns:
- the current Distribution object used by this state
-
setDistribution
void setDistribution(Distribution dis) throws ChangeVetoException
Set the Distribution associated with this state.- Parameters:
dis
- the new Distribution to use- Throws:
ChangeVetoException
- if the implementation doesn't support setting the distribution, or if the change is vetoed
-
-