Mac binaries
[jabaws.git] / website / archive / binaries / mac / src / fasta34 / drop_func.h
1 /* drop_func.h */
2
3 /* $Name: fa_34_26_5 $ - $Id: drop_func.h,v 1.7 2006/05/31 15:31:45 wrp Exp $ */
4
5 /* functions provided by each of the drop files */
6
7 /* Copyright (c) 2005 William R. Pearson and the University of Virginia */
8
9
10 void    /* initializes f_struct **f_arg */
11 init_work (unsigned char *aa0, int n0,
12            struct pstruct *ppst,
13 #ifndef DROP_INTERN
14            void **f_arg
15 #else
16            struct f_struct **f_arg
17 #endif
18 );
19
20
21 void    /* frees memory allocated in f_struct */
22 close_work (const unsigned char *aa0, int n0,
23             struct pstruct *ppst,
24 #ifndef DROP_INTERN
25            void **f_arg
26 #else
27            struct f_struct **f_arg
28 #endif
29 );
30
31 void    /* documents search function, parameters */
32 get_param (struct pstruct *pstr, char *pstring1, char *pstring2);
33
34 void    /* calculates alignment score(s), returns them in rst */
35 do_work (const unsigned char *aa0, int n0,
36          const unsigned char *aa1, int n1,
37          int frame,
38          struct pstruct *ppst,
39 #ifndef DROP_INTERN
40          void *f_arg,
41 #else
42          struct f_struct *f_arg,
43 #endif
44          int qr_flg, struct rstruct *rst);
45
46 void    /* calculates optimal alignment score */
47 do_opt (const unsigned char *aa0, int n0,
48         const unsigned char *aa1, int n1,
49         int frame,
50         struct pstruct *ppst,
51 #ifndef DROP_INTERN
52         void *f_arg,
53 #else
54         struct f_struct *f_arg,
55 #endif
56         struct rstruct *rst
57         );
58
59 int     /* produces encoding of alignment */
60 do_walign (const unsigned char *aa0, int n0,
61            const unsigned char *aa1, int n1,
62            int frame,
63            struct pstruct *ppst, 
64 #ifndef DROP_INTERN
65            void *f_arg,
66 #else
67            struct f_struct *f_arg,
68 #endif
69            struct a_res_str *a_res,
70            int *have_ares);
71
72 void
73 pre_cons(const unsigned char *aa, int n, int frame, 
74 #ifndef DROP_INTERN
75            void *f_arg
76 #else
77            struct f_struct *f_arg
78 #endif
79         );
80
81 void 
82 aln_func_vals(int frame, struct a_struct *aln);
83
84 int     /* takes aa0, aa1, a_res, and produces seqc0, seqc1 */
85 calcons(const unsigned char *aa0, int n0,
86         const unsigned char *aa1, int n1,
87         int *nc,
88         struct a_struct *aln,           /* seqc0/seqc1 coordinates */
89         struct a_res_str a_res,         /* aa0,aa1, coord, inc. res, nres */
90         struct pstruct pst,
91         char *seqc0, char *seqc1, char *seqca,
92 #ifndef DROP_INTERN
93         void *f_arg
94 #else
95         struct f_struct *f_arg
96 #endif
97         );
98
99 /* calcons_a - takes aa0, aa1, a_res, and produces seqc0, seqc1, 
100  *             and seqc0a, seqc1a - the annotated sequences 
101  */
102 int
103 calcons_a(const unsigned char *aa0, unsigned char *aa0a, int n0,
104           const unsigned char *aa1, int n1,
105           int *nc,
106           struct a_struct *aln,
107           struct a_res_str a_res,
108           struct pstruct pst,
109           char *seqc0, char *seqc0a, char *seqc1, char *seqca,
110           char *ann_arr,
111 #ifndef DROP_INTERN
112           void *f_arg
113 #else
114           struct f_struct *f_arg
115 #endif
116           );
117
118 int     /* returns lenc - length of aligment */
119 calc_code(const unsigned char *aa0, int n0,
120           const unsigned char *aa1, int n1,
121           struct a_struct *aln,
122           struct a_res_str a_res,
123           struct pstruct pst,
124           char *al_str, int al_str_n,
125 #ifndef DROP_INTERN
126           void *f_arg
127 #else
128           struct f_struct *f_arg
129 #endif
130           );
131
132 int     /* returns lenc - length of alignment */
133 calc_id(const unsigned char *aa0, int n0,
134         const unsigned char *aa1, int n1,
135         struct a_struct *aln, 
136         struct a_res_str a_res,
137         struct pstruct pst,
138 #ifndef DROP_INTERN
139         void *f_arg
140 #else
141         struct f_struct *f_arg
142 #endif
143         );