1 #ifndef DYNAMITEsyexonmodelHEADERFILE 2 #define DYNAMITEsyexonmodelHEADERFILE 3 #ifdef _cplusplus 4 extern "C" { 5 #endif 6 #include "dyna.h" 7 8 #define SyExonModelLISTLENGTH 128 9 #define SyExonScoreLISTLENGTH 128 10 11 struct Wise2_SyExon { 12 int dynamite_hard_link; 13 #ifdef PTHREAD 14 pthread_mutex_t dynamite_mutex; 15 #endif 16 Probability exit_prob; 17 Probability stay_prob; 18 Probability prev_prob; 19 } ; 20 /* SyExon defined */ 21 #ifndef DYNAMITE_DEFINED_SyExon 22 typedef struct Wise2_SyExon Wise2_SyExon; 23 #define SyExon Wise2_SyExon 24 #define DYNAMITE_DEFINED_SyExon 25 #endif 26 27 28 struct Wise2_SyExonScoreUnit { 29 int dynamite_hard_link; 30 #ifdef PTHREAD 31 pthread_mutex_t dynamite_mutex; 32 #endif 33 Score exit_score; 34 Score stay_score; 35 } ; 36 /* SyExonScoreUnit defined */ 37 #ifndef DYNAMITE_DEFINED_SyExonScoreUnit 38 typedef struct Wise2_SyExonScoreUnit Wise2_SyExonScoreUnit; 39 #define SyExonScoreUnit Wise2_SyExonScoreUnit 40 #define DYNAMITE_DEFINED_SyExonScoreUnit 41 #endif 42 43 44 struct Wise2_SyExonModel { 45 int dynamite_hard_link; 46 #ifdef PTHREAD 47 pthread_mutex_t dynamite_mutex; 48 #endif 49 SyExon ** exon; 50 int len;/* len for above exon */ 51 int maxlen; /* maxlen for above exon */ 52 } ; 53 /* SyExonModel defined */ 54 #ifndef DYNAMITE_DEFINED_SyExonModel 55 typedef struct Wise2_SyExonModel Wise2_SyExonModel; 56 #define SyExonModel Wise2_SyExonModel 57 #define DYNAMITE_DEFINED_SyExonModel 58 #endif 59 60 61 struct Wise2_SyExonScore { 62 int dynamite_hard_link; 63 #ifdef PTHREAD 64 pthread_mutex_t dynamite_mutex; 65 #endif 66 SyExonScoreUnit ** exon; 67 int len;/* len for above exon */ 68 int maxlen; /* maxlen for above exon */ 69 } ; 70 /* SyExonScore defined */ 71 #ifndef DYNAMITE_DEFINED_SyExonScore 72 typedef struct Wise2_SyExonScore Wise2_SyExonScore; 73 #define SyExonScore Wise2_SyExonScore 74 #define DYNAMITE_DEFINED_SyExonScore 75 #endif 76 77 78 79 80 /***************************************************/ 81 /* Callable functions */ 82 /* These are the functions you are expected to use */ 83 /***************************************************/ 84 85 86 87 /* Function: hard_link_SyExon(obj) 88 * 89 * Descrip: Bumps up the reference count of the object 90 * Meaning that multiple pointers can 'own' it 91 * 92 * 93 * Arg: obj [UNKN ] Object to be hard linked [SyExon *] 94 * 95 * Return [UNKN ] Undocumented return value [SyExon *] 96 * 97 */ 98 SyExon * Wise2_hard_link_SyExon(SyExon * obj); 99 #define hard_link_SyExon Wise2_hard_link_SyExon 100 101 102 /* Function: SyExon_alloc(void) 103 * 104 * Descrip: Allocates structure: assigns defaults if given 105 * 106 * 107 * 108 * Return [UNKN ] Undocumented return value [SyExon *] 109 * 110 */ 111 SyExon * Wise2_SyExon_alloc(void); 112 #define SyExon_alloc Wise2_SyExon_alloc 113 114 115 /* Function: free_SyExon(obj) 116 * 117 * Descrip: Free Function: removes the memory held by obj 118 * Will chain up to owned members and clear all lists 119 * 120 * 121 * Arg: obj [UNKN ] Object that is free'd [SyExon *] 122 * 123 * Return [UNKN ] Undocumented return value [SyExon *] 124 * 125 */ 126 SyExon * Wise2_free_SyExon(SyExon * obj); 127 #define free_SyExon Wise2_free_SyExon 128 129 130 /* Function: hard_link_SyExonScoreUnit(obj) 131 * 132 * Descrip: Bumps up the reference count of the object 133 * Meaning that multiple pointers can 'own' it 134 * 135 * 136 * Arg: obj [UNKN ] Object to be hard linked [SyExonScoreUnit *] 137 * 138 * Return [UNKN ] Undocumented return value [SyExonScoreUnit *] 139 * 140 */ 141 SyExonScoreUnit * Wise2_hard_link_SyExonScoreUnit(SyExonScoreUnit * obj); 142 #define hard_link_SyExonScoreUnit Wise2_hard_link_SyExonScoreUnit 143 144 145 /* Function: SyExonScoreUnit_alloc(void) 146 * 147 * Descrip: Allocates structure: assigns defaults if given 148 * 149 * 150 * 151 * Return [UNKN ] Undocumented return value [SyExonScoreUnit *] 152 * 153 */ 154 SyExonScoreUnit * Wise2_SyExonScoreUnit_alloc(void); 155 #define SyExonScoreUnit_alloc Wise2_SyExonScoreUnit_alloc 156 157 158 /* Function: free_SyExonScoreUnit(obj) 159 * 160 * Descrip: Free Function: removes the memory held by obj 161 * Will chain up to owned members and clear all lists 162 * 163 * 164 * Arg: obj [UNKN ] Object that is free'd [SyExonScoreUnit *] 165 * 166 * Return [UNKN ] Undocumented return value [SyExonScoreUnit *] 167 * 168 */ 169 SyExonScoreUnit * Wise2_free_SyExonScoreUnit(SyExonScoreUnit * obj); 170 #define free_SyExonScoreUnit Wise2_free_SyExonScoreUnit 171 172 173 /* Function: add_SyExonModel(obj,add) 174 * 175 * Descrip: Adds another object to the list. It will expand the list if necessary 176 * 177 * 178 * Arg: obj [UNKN ] Object which contains the list [SyExonModel *] 179 * Arg: add [OWNER] Object to add to the list [SyExon *] 180 * 181 * Return [UNKN ] Undocumented return value [boolean] 182 * 183 */ 184 boolean Wise2_add_SyExonModel(SyExonModel * obj,SyExon * add); 185 #define add_SyExonModel Wise2_add_SyExonModel 186 187 188 /* Function: flush_SyExonModel(obj) 189 * 190 * Descrip: Frees the list elements, sets length to 0 191 * If you want to save some elements, use hard_link_xxx 192 * to protect them from being actually destroyed in the free 193 * 194 * 195 * Arg: obj [UNKN ] Object which contains the list [SyExonModel *] 196 * 197 * Return [UNKN ] Undocumented return value [int] 198 * 199 */ 200 int Wise2_flush_SyExonModel(SyExonModel * obj); 201 #define flush_SyExonModel Wise2_flush_SyExonModel 202 203 204 /* Function: SyExonModel_alloc_std(void) 205 * 206 * Descrip: Equivalent to SyExonModel_alloc_len(SyExonModelLISTLENGTH) 207 * 208 * 209 * 210 * Return [UNKN ] Undocumented return value [SyExonModel *] 211 * 212 */ 213 SyExonModel * Wise2_SyExonModel_alloc_std(void); 214 #define SyExonModel_alloc_std Wise2_SyExonModel_alloc_std 215 216 217 /* Function: SyExonModel_alloc_len(len) 218 * 219 * Descrip: Allocates len length to all lists 220 * 221 * 222 * Arg: len [UNKN ] Length of lists to allocate [int] 223 * 224 * Return [UNKN ] Undocumented return value [SyExonModel *] 225 * 226 */ 227 SyExonModel * Wise2_SyExonModel_alloc_len(int len); 228 #define SyExonModel_alloc_len Wise2_SyExonModel_alloc_len 229 230 231 /* Function: hard_link_SyExonModel(obj) 232 * 233 * Descrip: Bumps up the reference count of the object 234 * Meaning that multiple pointers can 'own' it 235 * 236 * 237 * Arg: obj [UNKN ] Object to be hard linked [SyExonModel *] 238 * 239 * Return [UNKN ] Undocumented return value [SyExonModel *] 240 * 241 */ 242 SyExonModel * Wise2_hard_link_SyExonModel(SyExonModel * obj); 243 #define hard_link_SyExonModel Wise2_hard_link_SyExonModel 244 245 246 /* Function: SyExonModel_alloc(void) 247 * 248 * Descrip: Allocates structure: assigns defaults if given 249 * 250 * 251 * 252 * Return [UNKN ] Undocumented return value [SyExonModel *] 253 * 254 */ 255 SyExonModel * Wise2_SyExonModel_alloc(void); 256 #define SyExonModel_alloc Wise2_SyExonModel_alloc 257 258 259 /* Function: free_SyExonModel(obj) 260 * 261 * Descrip: Free Function: removes the memory held by obj 262 * Will chain up to owned members and clear all lists 263 * 264 * 265 * Arg: obj [UNKN ] Object that is free'd [SyExonModel *] 266 * 267 * Return [UNKN ] Undocumented return value [SyExonModel *] 268 * 269 */ 270 SyExonModel * Wise2_free_SyExonModel(SyExonModel * obj); 271 #define free_SyExonModel Wise2_free_SyExonModel 272 273 274 /* Function: add_SyExonScore(obj,add) 275 * 276 * Descrip: Adds another object to the list. It will expand the list if necessary 277 * 278 * 279 * Arg: obj [UNKN ] Object which contains the list [SyExonScore *] 280 * Arg: add [OWNER] Object to add to the list [SyExonScoreUnit *] 281 * 282 * Return [UNKN ] Undocumented return value [boolean] 283 * 284 */ 285 boolean Wise2_add_SyExonScore(SyExonScore * obj,SyExonScoreUnit * add); 286 #define add_SyExonScore Wise2_add_SyExonScore 287 288 289 /* Function: flush_SyExonScore(obj) 290 * 291 * Descrip: Frees the list elements, sets length to 0 292 * If you want to save some elements, use hard_link_xxx 293 * to protect them from being actually destroyed in the free 294 * 295 * 296 * Arg: obj [UNKN ] Object which contains the list [SyExonScore *] 297 * 298 * Return [UNKN ] Undocumented return value [int] 299 * 300 */ 301 int Wise2_flush_SyExonScore(SyExonScore * obj); 302 #define flush_SyExonScore Wise2_flush_SyExonScore 303 304 305 /* Function: SyExonScore_alloc_std(void) 306 * 307 * Descrip: Equivalent to SyExonScore_alloc_len(SyExonScoreLISTLENGTH) 308 * 309 * 310 * 311 * Return [UNKN ] Undocumented return value [SyExonScore *] 312 * 313 */ 314 SyExonScore * Wise2_SyExonScore_alloc_std(void); 315 #define SyExonScore_alloc_std Wise2_SyExonScore_alloc_std 316 317 318 /* Function: SyExonScore_alloc_len(len) 319 * 320 * Descrip: Allocates len length to all lists 321 * 322 * 323 * Arg: len [UNKN ] Length of lists to allocate [int] 324 * 325 * Return [UNKN ] Undocumented return value [SyExonScore *] 326 * 327 */ 328 SyExonScore * Wise2_SyExonScore_alloc_len(int len); 329 #define SyExonScore_alloc_len Wise2_SyExonScore_alloc_len 330 331 332 /* Function: hard_link_SyExonScore(obj) 333 * 334 * Descrip: Bumps up the reference count of the object 335 * Meaning that multiple pointers can 'own' it 336 * 337 * 338 * Arg: obj [UNKN ] Object to be hard linked [SyExonScore *] 339 * 340 * Return [UNKN ] Undocumented return value [SyExonScore *] 341 * 342 */ 343 SyExonScore * Wise2_hard_link_SyExonScore(SyExonScore * obj); 344 #define hard_link_SyExonScore Wise2_hard_link_SyExonScore 345 346 347 /* Function: SyExonScore_alloc(void) 348 * 349 * Descrip: Allocates structure: assigns defaults if given 350 * 351 * 352 * 353 * Return [UNKN ] Undocumented return value [SyExonScore *] 354 * 355 */ 356 SyExonScore * Wise2_SyExonScore_alloc(void); 357 #define SyExonScore_alloc Wise2_SyExonScore_alloc 358 359 360 /* Function: free_SyExonScore(obj) 361 * 362 * Descrip: Free Function: removes the memory held by obj 363 * Will chain up to owned members and clear all lists 364 * 365 * 366 * Arg: obj [UNKN ] Object that is free'd [SyExonScore *] 367 * 368 * Return [UNKN ] Undocumented return value [SyExonScore *] 369 * 370 */ 371 SyExonScore * Wise2_free_SyExonScore(SyExonScore * obj); 372 #define free_SyExonScore Wise2_free_SyExonScore 373 374 375 /* Unplaced functions */ 376 /* There has been no indication of the use of these functions */ 377 SyExonScore * Wise2_SyExonScore_flat_model(int start,int end,Probability exit,Probability final_stay); 378 #define SyExonScore_flat_model Wise2_SyExonScore_flat_model 379 SyExonModel * Wise2_SyExonModel_flat_model(int start,int end,Probability exit,Probability final_stay); 380 #define SyExonModel_flat_model Wise2_SyExonModel_flat_model 381 SyExonScore * Wise2_SyExonScore_from_SyExonModel(SyExonModel * sym); 382 #define SyExonScore_from_SyExonModel Wise2_SyExonScore_from_SyExonModel 383 SyExonScoreUnit * Wise2_SyExonScoreUnit_from_SyExon(SyExon * sye); 384 #define SyExonScoreUnit_from_SyExon Wise2_SyExonScoreUnit_from_SyExon 385 void Wise2_dump_SyExonScore(SyExonScore * sc,FILE *ofp); 386 #define dump_SyExonScore Wise2_dump_SyExonScore 387 388 389 /***************************************************/ 390 /* Internal functions */ 391 /* you are not expected to have to call these */ 392 /***************************************************/ 393 void Wise2_swap_SyExonModel(SyExon ** list,int i,int j) ; 394 #define swap_SyExonModel Wise2_swap_SyExonModel 395 void Wise2_qsort_SyExonModel(SyExon ** list,int left,int right,int (*comp)(SyExon * ,SyExon * )); 396 #define qsort_SyExonModel Wise2_qsort_SyExonModel 397 void Wise2_sort_SyExonModel(SyExonModel * obj,int (*comp)(SyExon *, SyExon *)); 398 #define sort_SyExonModel Wise2_sort_SyExonModel 399 boolean Wise2_expand_SyExonModel(SyExonModel * obj,int len); 400 #define expand_SyExonModel Wise2_expand_SyExonModel 401 void Wise2_swap_SyExonScore(SyExonScoreUnit ** list,int i,int j) ; 402 #define swap_SyExonScore Wise2_swap_SyExonScore 403 void Wise2_qsort_SyExonScore(SyExonScoreUnit ** list,int left,int right,int (*comp)(SyExonScoreUnit * ,SyExonScoreUnit * )); 404 #define qsort_SyExonScore Wise2_qsort_SyExonScore 405 void Wise2_sort_SyExonScore(SyExonScore * obj,int (*comp)(SyExonScoreUnit *, SyExonScoreUnit *)); 406 #define sort_SyExonScore Wise2_sort_SyExonScore 407 boolean Wise2_expand_SyExonScore(SyExonScore * obj,int len); 408 #define expand_SyExonScore Wise2_expand_SyExonScore 409 410 #ifdef _cplusplus 411 } 412 #endif 413 414 #endif 415