13 #if defined(IBM_AIX) && defined(MAXSEG)
19 int score; /* pam score with segment optimization */
20 int score0; /* pam score of best single segment */
21 int start0; /* score from global match */
22 int dp; /* diagonal of match */
23 int start; /* start of match in lib seq */
24 int stop; /* end of match in lib seq */
25 int exact; /* exact match */
27 int *used; /* array of positions in aa0 that were used */
31 struct dstruct { /* diagonal structure for saving current run */
32 int score; /* hash score of current match */
33 int start; /* start of current match */
34 int stop; /* end of current match */
35 struct savestr *dmax; /* location in vmax[] where best score data saved */
46 struct savestr *vmax; /* best matches saved for one sequence */
47 struct savestr **vptr;
49 struct savestr *lowmax;
50 int maxsav; /* max number of peptide alignments saved in search */
51 int maxsav_w; /* max number of peptide alignments saved in alignment */
56 int nm0; /* number of fragments */
57 #if defined(FASTS) || defined(FASTM)
58 int *nmoff; /* offset number, start */
60 int *aa0b; /* beginning of each segment */
61 int *aa0e; /* end of each segment */
62 int *aa0i; /* index of each segment */
63 int *aa0s; /* max score of each segment */
64 int *aa0l; /* longest possible peptide match */
66 int nmoff; /* offset number, start */
70 unsigned char *aa0t; /* temp location for peptides */
71 int *aa0ti; /* temp index for peptides */
72 int hmask; /* hash constants */
73 int *pamh1; /* pam based array */
74 int *pamh2; /* pam based kfact array */
75 #if defined(FASTS) || defined(FASTM)
76 int *link, *harr, *l_end; /* hash arrays */
78 struct hlstr *link, *harr; /* hash arrays */
80 int kshft; /* shift width */
81 int nsav, lowscor; /* number of saved runs, worst saved run */
82 unsigned char *aa1x; /* contains translated codons 111222333 */
83 unsigned char *aa1y; /* contains translated codons 123123123 */
89 #if defined(FASTS) || defined(FASTM)
90 struct tat_str **tatprobs; /* array of pointers to tat structs */
91 double **intprobs; /* array of integrated tatprobs */
101 struct tat_str *newtat;
112 void generate_tatprobs(const unsigned char *query,
118 struct tat_str **tatarg, struct tat_str *oldtat);
121 calc_tatusov ( struct slink *last,
123 const unsigned char *aa0, int n0,
124 const unsigned char *aa1, int n1,
126 struct f_struct *f_str,
132 double seg_tatprob(struct slink *start,
133 const unsigned char *aa0,
135 const unsigned char *aa1,
137 struct f_struct *f_str,
138 struct pstruct *ppst,
141 void calc_priors(double *priors,
142 struct pstruct *ppst,
143 struct f_struct *f_str,
144 const unsigned char *aa1,
145 int n1, int pseudocts);
147 double factorial (int a, int b);
149 int max_score(int *scores, int nsq);
151 int min_score(int *scores, int nsq);
153 double calc_spacefactor(struct f_struct *f_str);
155 void linreg(double *lnx, double *x, double *lny,
157 double *a, double *b, double *c, int start);