File: genewisemodeldb.h

package info (click to toggle)
wise 2.4.1-28
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 39,348 kB
  • sloc: ansic: 276,376; makefile: 1,021; perl: 886; lex: 93; yacc: 81; sh: 25
file content (311 lines) | stat: -rw-r--r-- 10,049 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
#ifndef DYNAMITEgenewisemodeldbHEADERFILE
#define DYNAMITEgenewisemodeldbHEADERFILE
#ifdef _cplusplus
extern "C" {
#endif
#include "dyna.h"
#include "genewisemodel.h"
#include "threestatedb.h"
#include "gwlitemodel.h"


/* Object GeneWiseDB
 *
 * Descrip: This is a database of genewisemodels
 *        for database searching versions of
 *        genewise and estwise type algorithms.
 *
 *        The actual HMM database streaming
 *        happens via the ThreeStateDB (tdb).
 *        This object holds the necessary conversion
 *        system for the HMM database as it
 *        is mapped into the genewisemodel
 *
 *
 */
struct Wise2_GeneWiseDB {  
    int dynamite_hard_link;  
#ifdef PTHREAD   
    pthread_mutex_t dynamite_mutex;  
#endif   
    ThreeStateDB * tdb;  
    double cds_factor;   
    CodonMapper * cm;   /*  NB, hard linked. */ 
    RandomModelDNA * rmd;   /*  NB hard linked */ 
    GeneWiseScore * gws;    /*  hardlinked, only if single. */ 
    GeneParameter21 * gpara;    /*  if a genomic model - est models wont use this! */ 
    boolean is_single;   
    boolean is_syn;  
    Probability allN;    
    boolean flat_insert;     
    GwLiteScore * gwls; /*  only if single */ 
    } ;  
/* GeneWiseDB defined */ 
#ifndef DYNAMITE_DEFINED_GeneWiseDB
typedef struct Wise2_GeneWiseDB Wise2_GeneWiseDB;
#define GeneWiseDB Wise2_GeneWiseDB
#define DYNAMITE_DEFINED_GeneWiseDB
#endif




    /***************************************************/
    /* Callable functions                              */
    /* These are the functions you are expected to use */
    /***************************************************/



/* Function:  init_GeneWiseDB(gdb,return_status)
 *
 * Descrip:    inits a genewise database. Remember this is used
 *             for both genomic and cdna searches
 *
 *
 *
 * Arg:                  gdb [UNKN ] Undocumented argument [GeneWiseDB *]
 * Arg:        return_status [UNKN ] Undocumented argument [int *]
 *
 * Return [UNKN ]  Undocumented return value [GeneWiseScore *]
 *
 */
GeneWiseScore * Wise2_init_GeneWiseDB(GeneWiseDB * gdb,int * return_status);
#define init_GeneWiseDB Wise2_init_GeneWiseDB


/* Function:  reload_GeneWiseDB(prev,gdb,return_status)
 *
 * Descrip:    Reloads a genewise database
 *
 *
 *
 * Arg:                 prev [UNKN ] Undocumented argument [GeneWiseScore *]
 * Arg:                  gdb [UNKN ] Undocumented argument [GeneWiseDB *]
 * Arg:        return_status [UNKN ] Undocumented argument [int *]
 *
 * Return [UNKN ]  Undocumented return value [GeneWiseScore *]
 *
 */
GeneWiseScore * Wise2_reload_GeneWiseDB(GeneWiseScore * prev,GeneWiseDB * gdb,int * return_status);
#define reload_GeneWiseDB Wise2_reload_GeneWiseDB


/* Function:  close_GeneWiseDB(gws,gdb)
 *
 * Descrip:    closes a GeneWiseDB
 *
 *
 * Arg:        gws [UNKN ] Undocumented argument [GeneWiseScore *]
 * Arg:        gdb [UNKN ] Undocumented argument [GeneWiseDB *]
 *
 * Return [UNKN ]  Undocumented return value [boolean]
 *
 */
boolean Wise2_close_GeneWiseDB(GeneWiseScore * gws,GeneWiseDB * gdb);
#define close_GeneWiseDB Wise2_close_GeneWiseDB


/* Function:  dataentry_add_GeneWiseDB(de,gws,gdb)
 *
 * Descrip:    adds dataentry stuff to a query. Relies completely
 *             on threestatedb
 *
 *
 * Arg:         de [UNKN ] Undocumented argument [DataEntry *]
 * Arg:        gws [UNKN ] Undocumented argument [GeneWiseScore *]
 * Arg:        gdb [UNKN ] Undocumented argument [GeneWiseDB *]
 *
 * Return [UNKN ]  Undocumented return value [boolean]
 *
 */
boolean Wise2_dataentry_add_GeneWiseDB(DataEntry * de,GeneWiseScore * gws,GeneWiseDB * gdb);
#define dataentry_add_GeneWiseDB Wise2_dataentry_add_GeneWiseDB


/* Function:  new_GeneWiseDB_cdna(syn,tdb,cp,cm,rmd,use_syn,flat_insert,allN)
 *
 * Descrip:    makes a new GeneWiseDB from its component parts,
 *             assuming a cDNA db.
 *
 *             All the objects are hard-linked internally, so you can, if you
 *             wish, free them once passing them into this function
 *
 *
 * Arg:                syn [UNKN ] if ture, use a synchronous coding model vs internally stored tdb rm's [NullString]
 * Arg:                tdb [UNKN ] three state model db to use [ThreeStateDB *]
 * Arg:                 cp [UNKN ] codon parser function to remove from match state [cDNAParser *]
 * Arg:                 cm [UNKN ] Undocumented argument [CodonMapper *]
 * Arg:                rmd [UNKN ] random model (dna) [RandomModelDNA *]
 * Arg:            use_syn [UNKN ] Undocumented argument [boolean]
 * Arg:        flat_insert [UNKN ] Undocumented argument [boolean]
 * Arg:               allN [UNKN ] Undocumented argument [Probability]
 *
 * Return [UNKN ]  Undocumented return value [GeneWiseDB *]
 *
 */
GeneWiseDB * Wise2_new_GeneWiseDB_cdna(ThreeStateDB * tdb,cDNAParser * cp,CodonMapper * cm,RandomModelDNA * rmd,boolean use_syn,boolean flat_insert,Probability allN) ;
#define new_GeneWiseDB_cdna Wise2_new_GeneWiseDB_cdna


/* Function:  new_GeneWiseDB(tdb,gp,rmd,use_syn,allN)
 *
 * Descrip:    makes a new GeneWiseDB from its component parts.
 *             All the objects are hard-linked internally, so you can, if you
 *             wish, free them once passing them into this function
 *
 *
 * Arg:            tdb [UNKN ] Undocumented argument [ThreeStateDB *]
 * Arg:             gp [UNKN ] Undocumented argument [GeneParameter21 *]
 * Arg:            rmd [UNKN ] Undocumented argument [RandomModelDNA *]
 * Arg:        use_syn [UNKN ] Undocumented argument [boolean]
 * Arg:           allN [UNKN ] Undocumented argument [Probability]
 *
 * Return [UNKN ]  Undocumented return value [GeneWiseDB *]
 *
 */
GeneWiseDB * Wise2_new_GeneWiseDB(ThreeStateDB * tdb,GeneParameter21 * gp,RandomModelDNA * rmd,boolean use_syn,Probability allN);
#define new_GeneWiseDB Wise2_new_GeneWiseDB


/* Function:  new_single_GeneWiseDB(gws)
 *
 * Descrip:    makes a new GeneWiseDB from a single GeneWiseScore.
 *             It hard links it, so you should free it afterwards
 *             in its own scope.
 *
 *
 * Arg:        gws [UNKN ] Undocumented argument [GeneWiseScore *]
 *
 * Return [UNKN ]  Undocumented return value [GeneWiseDB *]
 *
 */
GeneWiseDB * Wise2_new_single_GeneWiseDB(GeneWiseScore * gws);
#define new_single_GeneWiseDB Wise2_new_single_GeneWiseDB


/* Function:  init_GwLite_GeneWiseDB(gdb,return_status)
 *
 * Descrip:    inits a genewise database for gwlite models
 *
 *
 *
 *
 * Arg:                  gdb [UNKN ] Undocumented argument [GeneWiseDB *]
 * Arg:        return_status [UNKN ] Undocumented argument [int *]
 *
 * Return [UNKN ]  Undocumented return value [GwLiteScore *]
 *
 */
GwLiteScore * Wise2_init_GwLite_GeneWiseDB(GeneWiseDB * gdb,int * return_status);
#define init_GwLite_GeneWiseDB Wise2_init_GwLite_GeneWiseDB


/* Function:  reload_GwLite_GeneWiseDB(prev,gdb,return_status)
 *
 * Descrip:    Reloads a genewise database for a GwLite database
 *
 *
 *
 * Arg:                 prev [UNKN ] Undocumented argument [GwLiteScore *]
 * Arg:                  gdb [UNKN ] Undocumented argument [GeneWiseDB *]
 * Arg:        return_status [UNKN ] Undocumented argument [int *]
 *
 * Return [UNKN ]  Undocumented return value [GwLiteScore *]
 *
 */
GwLiteScore * Wise2_reload_GwLite_GeneWiseDB(GwLiteScore * prev,GeneWiseDB * gdb,int * return_status);
#define reload_GwLite_GeneWiseDB Wise2_reload_GwLite_GeneWiseDB


/* Function:  close_GwLite_GeneWiseDB(gws,gdb)
 *
 * Descrip:    closes a GeneWiseDB
 *
 *
 * Arg:        gws [UNKN ] Undocumented argument [GwLiteScore *]
 * Arg:        gdb [UNKN ] Undocumented argument [GeneWiseDB *]
 *
 * Return [UNKN ]  Undocumented return value [boolean]
 *
 */
boolean Wise2_close_GwLite_GeneWiseDB(GwLiteScore * gws,GeneWiseDB * gdb);
#define close_GwLite_GeneWiseDB Wise2_close_GwLite_GeneWiseDB


/* Function:  dataentry_add_GwLite_GeneWiseDB(de,gws,gdb)
 *
 * Descrip:    adds dataentry stuff to a query. Relies completely
 *             on threestatedb
 *
 *
 * Arg:         de [UNKN ] Undocumented argument [DataEntry *]
 * Arg:        gws [UNKN ] Undocumented argument [GwLiteScore *]
 * Arg:        gdb [UNKN ] Undocumented argument [GeneWiseDB *]
 *
 * Return [UNKN ]  Undocumented return value [boolean]
 *
 */
boolean Wise2_dataentry_add_GwLite_GeneWiseDB(DataEntry * de,GwLiteScore * gws,GeneWiseDB * gdb);
#define dataentry_add_GwLite_GeneWiseDB Wise2_dataentry_add_GwLite_GeneWiseDB


/* Function:  hard_link_GeneWiseDB(obj)
 *
 * Descrip:    Bumps up the reference count of the object
 *             Meaning that multiple pointers can 'own' it
 *
 *
 * Arg:        obj [UNKN ] Object to be hard linked [GeneWiseDB *]
 *
 * Return [UNKN ]  Undocumented return value [GeneWiseDB *]
 *
 */
GeneWiseDB * Wise2_hard_link_GeneWiseDB(GeneWiseDB * obj);
#define hard_link_GeneWiseDB Wise2_hard_link_GeneWiseDB


/* Function:  GeneWiseDB_alloc(void)
 *
 * Descrip:    Allocates structure: assigns defaults if given 
 *
 *
 *
 * Return [UNKN ]  Undocumented return value [GeneWiseDB *]
 *
 */
GeneWiseDB * Wise2_GeneWiseDB_alloc(void);
#define GeneWiseDB_alloc Wise2_GeneWiseDB_alloc


/* Function:  free_GeneWiseDB(obj)
 *
 * Descrip:    Free Function: removes the memory held by obj
 *             Will chain up to owned members and clear all lists
 *
 *
 * Arg:        obj [UNKN ] Object that is free'd [GeneWiseDB *]
 *
 * Return [UNKN ]  Undocumented return value [GeneWiseDB *]
 *
 */
GeneWiseDB * Wise2_free_GeneWiseDB(GeneWiseDB * obj);
#define free_GeneWiseDB Wise2_free_GeneWiseDB


  /* Unplaced functions */
  /* There has been no indication of the use of these functions */


    /***************************************************/
    /* Internal functions                              */
    /* you are not expected to have to call these      */
    /***************************************************/
GeneWise * Wise2_GeneWise_from_ThreeStateModel_GDB(ThreeStateModel * tsm,GeneWiseDB * gdb);
#define GeneWise_from_ThreeStateModel_GDB Wise2_GeneWise_from_ThreeStateModel_GDB

#ifdef _cplusplus
}
#endif

#endif