File: sim4.h

package info (click to toggle)
sim4 0.0.20121010-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 456 kB
  • ctags: 503
  • sloc: ansic: 5,807; makefile: 16
file content (142 lines) | stat: -rw-r--r-- 3,551 bytes parent folder | download | duplicates (5)
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
#ifndef SIM4_H
#define SIM4_H

/* $Id: sim4.h,v 1.21 2002/01/24 00:56:23 schwartz Exp $ */

#define  DEFAULT_NUM_I     3       
#define  DIST_CUTOFF       3
#define  DEFAULT_MIN_COV   (.8)

#define  MININT           (-99999)
#define  MIN_INTRON        30
#define  MAX_INTRON        20000
#define  MAX_GRINIT        500
#define  MAX_INTERNAL_GAP  50   /* 50 */
#define  LL                60

#define  DEFAULT_DRANGE    10
#define  DEFAULT_WEIGHT    100
#define  DEFAULT_RELINK_H  500
#define  DEFAULT_W         12
#define  DEFAULT_X         12    
#define  DEFAULT_K         16
#define  DEFAULT_C         12
#define  LINK              0
#define  RELINK            1
#define  P                 (.2)

#define  min(x,y)        ((x>y) ? (y):(x))
#define  max(x,y)        ((x<y) ? (y):(x))
#define  START_SIG       ((G_score >= abs(C_score)) ? "GT" : "CT") 
#define  END_SIG         ((G_score >= abs(C_score)) ? "AG" : "AC")

#define  MATCH           1
#define  MISMATCH       (-5)
#define  L               8

#define  DELETE          1
#define  INSERT          2
#define  SUBSTITUTE      3
#define  INTRON          4
#define  O_INTRON        5

#undef TRUE
#undef FALSE
enum { FALSE = 0, TRUE = 1};
enum { INIT = 0, PERM = 1, TEMP = 2};
enum { EST_GEN = 1, GEN_EST = 2 };
enum { FWD = 0, BWD = 1, BOTH = 2 };
enum { OK = 0, FREE_START = 1, FREE_END = 2, FREE_BOTH_ENDS = 3};

/* data structures */

/* used in select_path() */
typedef struct msp {
        int len, pos1, pos2;
        int score;
        int Score;
        int  prev;
        struct msp *next_msp;
        } *Msp_ptr;

typedef struct exon {
        int  from1, from2, to1, to2;
        int  min_diag, max_diag;
        int  match;
        char ori;
        int  length;
        int  flag;
        int  ematches;
        int  nmatches;
        int  edist;
        int  alen;
        Msp_ptr msps;
        struct exon *next_exon;
        } *Exon_ptr;

typedef struct intron {
        int from1, from2, to1, to2;
        int  length;
        char orientation;
        struct intron *next_intron;
} *Intron_ptr, Intron;

typedef struct exon   Exon;

typedef struct coordinates {
        int pos1;
        int pos2;
}  coords;

/* used only in the alignment stage */
typedef struct edit_script {
        char op_type;   /* SUB, INS, or DEL */
        int num;        /* Number of operations */
        struct edit_script *next;
} edit_script;

typedef struct edit_script_list {
        int   offset1, offset2;
        int   len1, len2; 
        int    score;
        struct edit_script *script;
        struct edit_script_list *next_script;
} edit_script_list;

struct edit {
        struct edit *link;              /* previous edit instruction */
        char   type[2];
        int    accumulation;
        char   op;                      /* INSERT, DELETE or INTRON */
        int    line1;                   /* line number in file1 */
        int    line2;                   /* line number in file2 */
};

typedef  void  *Pointer;

typedef  struct ValNode {
         Pointer      data;
         struct ValNode *next;
} *ValNodePtr;

typedef int signal_t[5][5];

typedef struct spliced {
   int xs, xe, ys, ye, score;
   char type;
   struct spliced *next;
} splice_t;

typedef struct sim4_stats {
   int internal, icoverage, mult, nmatches;
   double fcoverage, marginals;
} sim4_stats_t;

typedef struct sim4_args {
   int ali_flag, poly_flag, acc_flag, reverse, DRANGE, weight, cutoff;
   int set_K, set_C, set_H;
   int W, K, C, X, B, CDS_from, CDS_to;
   char *S;
} sim4_args_t;

#endif