JPRED-2 Add sources of all binaries (except alscript) to Git
[jpred.git] / sources / multicoil / sc2seq.h
diff --git a/sources/multicoil/sc2seq.h b/sources/multicoil/sc2seq.h
new file mode 100644 (file)
index 0000000..aa7bb10
--- /dev/null
@@ -0,0 +1,166 @@
+/*  Bonnie Berger, David Wilson and Theodore Tonchev 1992  */
+/*      C Header File: modified Ethan Wolf 1995      */
+
+/*  Defines function names called by sc2seq.c.       */
+
+#ifndef __ScFreq_h__
+#define __ScFreq_h__ 1
+
+#include "scconst.h"
+#include "sc.h"
+#include "interface.h"
+
+
+/* For Coil_Interface.  */
+void PairCoilData (FILE *fgin, FILE **fpin,
+                  int ProlineFree, int table_to_remove_from,
+                  char *input_filename, int mode,
+                  long pfreqp[MAX_TABLE_NUMBER][AANUM][AANUM][POSNUM][POSNUM]);
+void switch_tables(int table);
+void recalc_prob(Sequence sequence, int input_table, int mode, long pfreqp[MAX_TABLE_NUMBER][AANUM][AANUM][POSNUM][POSNUM]);
+void average_many_pprob(int current_table);
+
+
+
+
+void  preprocessor_score(char lib[MAXFUNCTNUM], 
+                        char multi_lib[MAX_TABLE_NUMBER][MAXFUNCTNUM],
+                        double *m, double *b, 
+                      double *m_single, double *b_single, int mode, 
+                        int Preprocessor_Method, int Offset_to_Use, 
+              double preprocessor_like[MAX_TABLE_NUMBER][MAXSEQLEN][POSNUM+1],
+                        Sequence sequence,
+                      char all_preproc_offsets[MAX_NUM_SCORE_DIM][MAXSEQLEN],
+                        double bound);
+
+double *ScoreSeq (char lib[MAXFUNCTNUM],
+                 char multi_lib[MAX_TABLE_NUMBER][MAXFUNCTNUM],
+                 double *m_paircoil, double *b_paircoil,
+                 double *m_single, double *b_single,
+                 int mode, int Table, int Method, 
+                 int Preprocessor_Method, int Offset_to_Use,
+                 double *maxscore, 
+                 int rescore_seq, int rescore_preproc, double bound);
+
+void DimerTrimerScore (int mode, Sequence sequence, 
+                         double PairCoilLike[MAXSEQLEN][POSNUM+1],
+                         double *maxscore,
+                         int pairs, int coils, 
+                         double m, double b, int offset_to_use,
+                         double scores[MAXSEQLEN][POSNUM+1],int like2or3,
+                         int CoilDiffMethod, int start_coil_at_reg_shift);
+
+void PairCoilScore (int mode, Sequence sequence, char lib[MAXFUNCTNUM], 
+                      double m, double b, 
+                      double *maxscore, int table, char offsets[MAXSEQLEN],
+                      double like[MAXSEQLEN][POSNUM+1], int offset_to_use,
+                      int raw_score);
+void PairCoilDiffer (int mode, Sequence sequence, char lib[MAXFUNCTNUM], 
+                      double *maxscore,  char offsets[MAXSEQLEN],
+                      double like[MAXSEQLEN][POSNUM+1], int offset_to_use,
+                      int table,double scores[MAXSEQLEN][POSNUM+1],
+                      int Avg_Coil_Score,
+                      int CoilDiffMethod, int start_coil_at_reg_shift);
+void SingleCoilScore(int mode, Sequence sequence, double m, double b,
+                       double *maxscore, int table, 
+                       double scores[MAXSEQLEN][POSNUM+1],int offset_to_use,
+                       int raw_score);
+void NEWCOILSScore(int mode, Sequence sequence, double *maxscore,
+                  double scores[MAXSEQLEN][POSNUM+1], int offset_to_use);
+
+void ActualCoils (Sequence sequence,double scores[MAXSEQLEN][POSNUM+1],
+                 int offset_to_use, int preprocessor); 
+                /** Do "all offsets method" differently for a preprocessor **/
+/***************************/
+
+
+/* Proceduere in get_defaults.c. */
+void get_defaults(char *command_line_config,
+                 char *input_location, int *mode, double *bound, 
+                   FILE **fgin, FILE **fpin,
+                    FILE **ftotal_like, FILE **fout, 
+                   FILE **flog,
+                   FILE **fout_coils,  
+                   int *by_coil_or_seq,
+                   char likelihoods[MAX_TABLE_NUMBER][MAXLINE],
+                   char *pir_name, char *lib, 
+                   char multi_lib[MAX_TABLE_NUMBER][MAXFUNCTNUM],
+                   int *functnum, 
+                   int combine_dist[MAX_TABLE_NUMBER],
+                   char *print, int *main_method, 
+                   int *main_preprocessor_method, int *main_table, 
+                   int *offset_to_use,
+                   int *avg_max,
+                   int *Coil_Score,
+                   int *ps_res_per_line,
+                   char class_sc_filenames[2][MAX_CLASS_NUMBER][MAXLINE],
+                   char gaussian_parameters[2][MAXLINE],
+                   int num_dist[MAX_TABLE_NUMBER],
+                   double init_class_prob[MAX_CLASS_NUMBER],
+                   int *table_to_remove_from,
+                   char *command_line, 
+                   int window_length[MAX_TABLE_NUMBER],
+                   double scale0s[MAX_TABLE_NUMBER],
+                   double scale0p[MAX_TABLE_NUMBER]);
+
+/* Procedure Prototypes */
+void init();
+
+void done();
+
+long calcseq(FILE* fgin, FILE* fpin, FILE* ftest, FILE* fout, FILE* flog,
+            FILE* regionfile, int ver_mode, double bound, double upper_bound,
+            char *lib);
+
+
+/* These functions are def'd in scpos.c for reading sequences in the pos */
+/* format (listing coiled region and registers) and for removing and     */
+/* adding these sequences from the positive table when necessary.        */
+void add_seq2(long pfreqs[AANUM][POSNUM], 
+       long ptotals[POSNUM],
+       long pfreqp[AANUM][AANUM][POSNUM][POSNUM], 
+       long ptotalp[POSNUM][POSNUM],
+        char reg[MAXSEQLEN],
+       char seq[MAXSEQLEN], int seqlen, int bias);
+
+int getpos (FILE *fl, Sequence *sequence);
+
+/*****************************************************************************/
+
+/* These functions are def'd in output.c for various forms of result output. */
+
+void log_output_ver(int prog, double score, double stockscore, 
+                   double scoresc2seq, int cnt, char *title, 
+                   char *code, FILE *flog);
+
+void log_output_prn(int mode, double score, double scs[MAXSEQLEN][POSNUM], 
+                   char offsets[MAXSEQLEN], int seqlen, int cnt, 
+                   Sequence sequence, double bound, 
+                   double upper_bound, FILE *flog);
+
+void txt_output(Sequence sequence, int mode, 
+               FILE *fout, double scs[MAXSEQLEN][POSNUM], 
+               double like[MAXSEQLEN][POSNUM +1],
+               char offsets[MAXSEQLEN], double bound);
+
+void print_coil(int mode, int seqlen, char reg[MAXSEQLEN], 
+               double scs[MAXSEQLEN][POSNUM], double bound,
+               double  upper_bound, char offsets[MAXSEQLEN], 
+               char seq[MAXSEQLEN], FILE *flog);
+/****************************************************************************/
+
+void usage(char *prog_command);
+
+int getpos (FILE *fl, Sequence *sequence);
+
+void dumpvals (FILE *out, char seq[], char reg[], char offsets[], int seqlen,
+               double scs[MAXSEQLEN][POSNUM], double bound);
+
+
+#endif   /* __ScFreq_h__ */
+
+/*       End of Code       */
+
+
+
+