|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectstatalign.base.hmm.Hmm
statalign.base.hmm.Hmm2
statalign.base.hmm.HmmTkf92
public class HmmTkf92
This class implements a simplified version of the TKF92 pair-HMM.
| Field Summary |
|---|
| Fields inherited from class statalign.base.hmm.Hmm |
|---|
params |
| Constructor Summary | |
|---|---|
HmmTkf92(double[] defParams)
This constructor creates a TKF92 pair-HMM for the tree |
|
| Method Summary | |
|---|---|
double[][] |
calcTransMatrix(double[][] transMatrix,
double t)
|
int[] |
getEmitPatt2State()
Returns a conversion array from emission patterns (coded as integers) into state indices. |
int |
getEnd()
Returns the index of the end state. |
double |
getLogStationaryProb(int length)
Returns the logarithm of the stationary probability of generating a sequence of length characters under the HMM. |
int |
getStart()
Returns the index of the start state. |
int[][] |
getStateEmit()
Returns an array specifying the emission pattern of each state. |
static void |
main(java.lang.String[] args)
For testing purposes. |
double[][] |
preCalcTransMatrix(double[][] transMatrix,
double t)
Calculates a transition matrix given an edge length. |
double[][] |
preCalcTransMatrix(double[][] transMatrix,
double t,
double[] newParams)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HmmTkf92(double[] defParams)
defParams - The default parameters of the model. Currently it is r = 0.2, lambda = 0.009,
mu = 0.011.| Method Detail |
|---|
public int[][] getStateEmit()
getStateEmit in class Hmmpublic int[] getEmitPatt2State()
getEmitPatt2State in class Hmmpublic int getStart()
getStart in class Hmmpublic int getEnd()
getEnd in class Hmm
public double[][] preCalcTransMatrix(double[][] transMatrix,
double t)
preCalcTransMatrix in class Hmm2transMatrix - If null, the function allocates memory for the return matrix
If not, this is used for storing the matrix. For speeding-up purposes,
note that allocating memory is time-consuming. In this way we need to allocate
memory when asked.t - The edge length parameter.
public double[][] preCalcTransMatrix(double[][] transMatrix,
double t,
double[] newParams)
preCalcTransMatrix in class Hmm2transMatrix - If null, the function allocates memory for the return matrix
If not, this is used for storing the matrix. For speeding-up purposes,
note that allocating memory is time-consuming. In this way we need to allocate
memory when asked.t - The edge length parameter.newParams - A set of temporary parameters to be used for this particular instance
public double[][] calcTransMatrix(double[][] transMatrix,
double t)
public double getLogStationaryProb(int length)
Hmmlength characters under the HMM.
getLogStationaryProb in class Hmmlength - The length of the sequence whose stationary
probability is to be computed.
public static void main(java.lang.String[] args)
args - No argument is used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||