5 /******************************************************************************
6 Data structure for hidden Markov model. Entries are the number of states,
7 the initial probabilities, the transition probabilities, and a function
8 which computes the normalized probabilities of the output symbols. The
9 transition probabilities are listed for each nonzero transition. Included
10 are the number of such transitions, the from state, the to state, and the
12 A prototype of normalized probabilities function is normprob() below.
13 This function is also passed a pointer to some data which it might use.
14 ******************************************************************************/
16 /******************************************************************************
17 Given a sequence, for each residue for each state fill in the normalized
18 probability that that state outputs that residue given its surroundings.
19 nprobs[nstates*i+q] contains the data for position i in state q.
20 ******************************************************************************/
21 /*normprob (double *nprobs, char *seq, int length, void *data);*/
25 double *initprob, *finprob;
26 int *transf, *transt, ntrans;
32 /* Score sequence using the hidden Markov model */
33 void HMMScore (char *seq, int length, HMM *hmm,
34 double scores[MAXSEQLEN][POSNUM+1], int table,
36 /* Create the CC HMM given the files to the frquency tables */
37 HMM *CCHMM (/*FILE *fgin, FILE *fpin*/);