1 /* Bonnie Berger, David Wilson and Theodore Tonchev 1992 */
2 /* C Header File: modified Ethan Wolf 1995 */
4 /* Defines function names called by sc2seq.c. */
11 #include "interface.h"
14 /* For Coil_Interface. */
15 void PairCoilData (FILE *fgin, FILE **fpin,
16 int ProlineFree, int table_to_remove_from,
17 char *input_filename, int mode,
18 long pfreqp[MAX_TABLE_NUMBER][AANUM][AANUM][POSNUM][POSNUM]);
19 void switch_tables(int table);
20 void recalc_prob(Sequence sequence, int input_table, int mode, long pfreqp[MAX_TABLE_NUMBER][AANUM][AANUM][POSNUM][POSNUM]);
21 void average_many_pprob(int current_table);
26 void preprocessor_score(char lib[MAXFUNCTNUM],
27 char multi_lib[MAX_TABLE_NUMBER][MAXFUNCTNUM],
29 double *m_single, double *b_single, int mode,
30 int Preprocessor_Method, int Offset_to_Use,
31 double preprocessor_like[MAX_TABLE_NUMBER][MAXSEQLEN][POSNUM+1],
33 char all_preproc_offsets[MAX_NUM_SCORE_DIM][MAXSEQLEN],
36 double *ScoreSeq (char lib[MAXFUNCTNUM],
37 char multi_lib[MAX_TABLE_NUMBER][MAXFUNCTNUM],
38 double *m_paircoil, double *b_paircoil,
39 double *m_single, double *b_single,
40 int mode, int Table, int Method,
41 int Preprocessor_Method, int Offset_to_Use,
43 int rescore_seq, int rescore_preproc, double bound);
45 void DimerTrimerScore (int mode, Sequence sequence,
46 double PairCoilLike[MAXSEQLEN][POSNUM+1],
49 double m, double b, int offset_to_use,
50 double scores[MAXSEQLEN][POSNUM+1],int like2or3,
51 int CoilDiffMethod, int start_coil_at_reg_shift);
53 void PairCoilScore (int mode, Sequence sequence, char lib[MAXFUNCTNUM],
55 double *maxscore, int table, char offsets[MAXSEQLEN],
56 double like[MAXSEQLEN][POSNUM+1], int offset_to_use,
58 void PairCoilDiffer (int mode, Sequence sequence, char lib[MAXFUNCTNUM],
59 double *maxscore, char offsets[MAXSEQLEN],
60 double like[MAXSEQLEN][POSNUM+1], int offset_to_use,
61 int table,double scores[MAXSEQLEN][POSNUM+1],
63 int CoilDiffMethod, int start_coil_at_reg_shift);
64 void SingleCoilScore(int mode, Sequence sequence, double m, double b,
65 double *maxscore, int table,
66 double scores[MAXSEQLEN][POSNUM+1],int offset_to_use,
68 void NEWCOILSScore(int mode, Sequence sequence, double *maxscore,
69 double scores[MAXSEQLEN][POSNUM+1], int offset_to_use);
71 void ActualCoils (Sequence sequence,double scores[MAXSEQLEN][POSNUM+1],
72 int offset_to_use, int preprocessor);
73 /** Do "all offsets method" differently for a preprocessor **/
74 /***************************/
77 /* Proceduere in get_defaults.c. */
78 void get_defaults(char *command_line_config,
79 char *input_location, int *mode, double *bound,
80 FILE **fgin, FILE **fpin,
81 FILE **ftotal_like, FILE **fout,
85 char likelihoods[MAX_TABLE_NUMBER][MAXLINE],
86 char *pir_name, char *lib,
87 char multi_lib[MAX_TABLE_NUMBER][MAXFUNCTNUM],
89 int combine_dist[MAX_TABLE_NUMBER],
90 char *print, int *main_method,
91 int *main_preprocessor_method, int *main_table,
96 char class_sc_filenames[2][MAX_CLASS_NUMBER][MAXLINE],
97 char gaussian_parameters[2][MAXLINE],
98 int num_dist[MAX_TABLE_NUMBER],
99 double init_class_prob[MAX_CLASS_NUMBER],
100 int *table_to_remove_from,
102 int window_length[MAX_TABLE_NUMBER],
103 double scale0s[MAX_TABLE_NUMBER],
104 double scale0p[MAX_TABLE_NUMBER]);
106 /* Procedure Prototypes */
111 long calcseq(FILE* fgin, FILE* fpin, FILE* ftest, FILE* fout, FILE* flog,
112 FILE* regionfile, int ver_mode, double bound, double upper_bound,
116 /* These functions are def'd in scpos.c for reading sequences in the pos */
117 /* format (listing coiled region and registers) and for removing and */
118 /* adding these sequences from the positive table when necessary. */
119 void add_seq2(long pfreqs[AANUM][POSNUM],
120 long ptotals[POSNUM],
121 long pfreqp[AANUM][AANUM][POSNUM][POSNUM],
122 long ptotalp[POSNUM][POSNUM],
124 char seq[MAXSEQLEN], int seqlen, int bias);
126 int getpos (FILE *fl, Sequence *sequence);
128 /*****************************************************************************/
130 /* These functions are def'd in output.c for various forms of result output. */
132 void log_output_ver(int prog, double score, double stockscore,
133 double scoresc2seq, int cnt, char *title,
134 char *code, FILE *flog);
136 void log_output_prn(int mode, double score, double scs[MAXSEQLEN][POSNUM],
137 char offsets[MAXSEQLEN], int seqlen, int cnt,
138 Sequence sequence, double bound,
139 double upper_bound, FILE *flog);
141 void txt_output(Sequence sequence, int mode,
142 FILE *fout, double scs[MAXSEQLEN][POSNUM],
143 double like[MAXSEQLEN][POSNUM +1],
144 char offsets[MAXSEQLEN], double bound);
146 void print_coil(int mode, int seqlen, char reg[MAXSEQLEN],
147 double scs[MAXSEQLEN][POSNUM], double bound,
148 double upper_bound, char offsets[MAXSEQLEN],
149 char seq[MAXSEQLEN], FILE *flog);
150 /****************************************************************************/
152 void usage(char *prog_command);
154 int getpos (FILE *fl, Sequence *sequence);
156 void dumpvals (FILE *out, char seq[], char reg[], char offsets[], int seqlen,
157 double scs[MAXSEQLEN][POSNUM], double bound);
160 #endif /* __ScFreq_h__ */