| 1 | /* prior.h |
| 2 | * Dirichlet priors for parameterizing a new model. |
| 3 | * |
| 4 | * Original code from Eric Nawrocki; adapted by SRE. |
| 5 | * SRE, Thu Apr 7 10:16:54 2005 |
| 6 | */ |
| 7 | #ifndef PRIOR_INCLUDED |
| 8 | #define PRIOR_INCLUDED |
| 9 | |
| 10 | #include <stdio.h> |
| 11 | |
| 12 | #include "esl_mixchlet.h" |
| 13 | #include "structs.h" |
| 14 | |
| 15 | /* Structure: Prior_t |
| 16 | * |
| 17 | * Dirichlet priors on all model parameters. |
| 18 | */ |
| 19 | typedef struct { |
| 20 | /* transition priors */ |
| 21 | int tsetnum; /* number of transition sets to read in */ |
| 22 | int tsetmap[UNIQUESTATES][NODETYPES]; /* tsetmap[a][b] is for transition set from ustate a to node b */ |
| 23 | ESL_MIXDCHLET **t; /* array of transition priors, 0..tsetnum-1 */ |
| 24 | |
| 25 | /* emission priors */ |
| 26 | ESL_MIXDCHLET *mbp; /* consensus base pair emission prior */ |
| 27 | ESL_MIXDCHLET *mnt; /* consensus singlet emission prior */ |
| 28 | ESL_MIXDCHLET *i; /* nonconsensus singlet emission prior */ |
| 29 | |
| 30 | /* bookkeeping */ |
| 31 | int maxnq; /* maximum # of components in any prior */ |
| 32 | int maxnalpha; /* maximum # of parameters in any prior */ |
| 33 | } Prior_t; |
| 34 | |
| 35 | extern Prior_t *Prior_Create(void); |
| 36 | extern void Prior_Destroy(Prior_t *pri); |
| 37 | extern Prior_t *Prior_Read(FILE *fp); |
| 38 | extern void PriorifyCM(CM_t *cm, const Prior_t *pri); |
| 39 | extern Prior_t *Prior_Default(void); |
| 40 | |
| 41 | #endif |