Class ProfileHMM
- All Implemented Interfaces:
Serializable
,MarkovModel
,Changeable
- Direct Known Subclasses:
HmmerProfileHMM
- Author:
- Matthew Pocock, Lachlan Coin
- See Also:
-
Field Summary
Fields inherited from class org.biojava.bio.dp.SimpleMarkovModel
serialVersionUID
Fields inherited from interface org.biojava.bio.dp.MarkovModel
ARCHITECTURE, PARAMETER
-
Constructor Summary
ConstructorsConstructorDescriptionProfileHMM
(Alphabet alpha, int columns, DistributionFactory matchFactory, DistributionFactory insertFactory) Deprecated.ProfileHMM
(Alphabet alpha, int columns, DistributionFactory matchFactory, DistributionFactory insertFactory, String name) Create a new ProfileHMM. -
Method Summary
Modifier and TypeMethodDescriptionint
columns()
Retrieve the number of columns in the model.protected void
This is called by constructor in setting up the allowed transitions in the modelgetDelete
(int indx) Retrieves the delete state for column indx.getInsert
(int indx) Retrieves the insert state at column indx.getMatch
(int indx) Retrieve the match state at column indx.Methods inherited from class org.biojava.bio.dp.SimpleMarkovModel
addState, advance, containsTransition, createTransition, destroyTransition, emissionAlphabet, getChangeSupport, getWeights, heads, magicalState, removeState, setWeights, stateAlphabet, toString, transitionsFrom, transitionsTo
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
ProfileHMM
public ProfileHMM(Alphabet alpha, int columns, DistributionFactory matchFactory, DistributionFactory insertFactory) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException Deprecated. -
ProfileHMM
public ProfileHMM(Alphabet alpha, int columns, DistributionFactory matchFactory, DistributionFactory insertFactory, String name) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException Create a new ProfileHMM.The profile will be over the Alphabet alpha. It will have 'columns' match states, 'columns' delete states and 'columns'+1 insert states. The match states will be created by matchFactory, and the insert states will be created by insertFactory. This gives you great freedom for changing how the states are implemented. For example, insertFactory may always return views onto a single underlying probability distribution in which case all insert states will emit the same type of stuff - or it may create an individual state for each insert state, in which case each insert can be a different type of thing. You could make the insert state a view onto your null model, or onto a protein-specific distribution.
- Parameters:
alpha
- the Alphabet that the profile hmm will emitcolumns
- the number of match statesmatchFactory
- the StateFactory to use for creating the match statesinsertFactory
- the stateFactory to use for creating the insert states- Throws:
IllegalSymbolException
IllegalTransitionException
IllegalAlphabetException
-
-
Method Details
-
columns
Retrieve the number of columns in the model.- Returns:
- the number of columns
-
getMatch
Retrieve the match state at column indx.The first match state is at index 1, and the last match state is at column columns(). The states at index 0 and columns()+1 are both the magical state. This is so that the whole model backbone can be addressed without writing lots of special-case code.
- Parameters:
indx
- the index of the column to retrieve the match state for- Returns:
- the match state for column indx
- Throws:
IndexOutOfBoundsException
- if indx is negative or above columns()+1
-
getInsert
Retrieves the insert state at column indx.Insert_0 is the insert that is accessible directly from the magical state. Insert_1..columns() are 'above' each propper match state. There is no insert state above the magical state at the end of the model, as insert_columns already models trailing inserts.
- Parameters:
indx
- the index of the column to retrieve the insert state for- Returns:
- the insert state for column indx
- Throws:
IndexOutOfBoundsException
- if indx is negative or above columns()
-
getDelete
Retrieves the delete state for column indx.Delete states are 'above' the match state that they delete. There is no delete state for the magical state at either the beginning or end of the model, so the delete state indx can range within (1..columns()).
- Parameters:
indx
- the index of the column to retrieve the insert state for- Returns:
- the insert state for column indx
- Throws:
IndexOutOfBoundsException
- if indx is negative or above columns()
-
connectModel
protected void connectModel() throws ChangeVetoException, IllegalSymbolException, IllegalTransitionException, IllegalAlphabetExceptionThis is called by constructor in setting up the allowed transitions in the model
-