changed void PairCoilData (FILE *fgin, FILE **fpin, int *number_tables, int ProlineFree, int table_to_remove_from, char *input_filename, int mode, double prior_freq_single[MAX_TABLE_NUMBER], double prior_freq_pair[MAX_TABLE_NUMBER], int which_priors, int which_priorp, int good_turing, int structural_pos[POSNUM+1]) to void PairCoilData (FILE *fgin, FILE **fpin, int *number_tables, int ProlineFree, int table_to_remove_from, char *input_filename, int mode) changed if (!(mode & WEIGHTED_PROBS)) { set_unimportant_pos_to_genbnk(many_pprobs[i], many_pprobp[i], gprobs, gprobp, structural_pos); estimate_database_probs(i, pfreqs[i], ptotals[i], many_pprobs, pfreqp[i], ptotalp[i], many_pprobp, ProlineFree, which_priors, which_priorp, prior_freq_single[i], prior_freq_pair[i], good_turing, structural_pos); to if (!(mode & WEIGHTED_PROBS)) { estimate_database_probs(i, pfreqs[i], ptotals[i], many_pprobs, pfreqp[i], ptotalp[i], many_pprobp, ProlineFree); changed void recalc_prob(Sequence sequence, int input_table, int mode, int which_priors, int which_priorp, double prior_freq_single[MAX_TABLE_NUMBER], double prior_freq_pair[MAX_TABLE_NUMBER], int good_turing, int structural_pos[POSNUM+1]) to void recalc_prob(Sequence sequence, int input_table, int mode) and estimate_database_probs(input_table, pfreqs[input_table], ptotals[input_table], many_pprobs, pfreqp[input_table], ptotalp[input_table], many_pprobp, ProlineFreeWindow, which_priors, which_priorp, prior_freq_single[input_table], prior_freq_pair[input_table], good_turing, structural_pos); to estimate_database_probs2(input_table, pfreqs[input_table], ptotals[input_table], many_pprobs, pfreqp[input_table], ptotalp[input_table], many_pprobp, ProlineFreeWindow); in PairCoilData changed for (i=0; i<*number_tables; i++) change void average_score_over_coils3(Sequence seq, double StructureResLike[MAXSEQLEN][POSNUM+1], double StructureCoilLike[MAXSEQLEN][POSNUM+1], double CoilLike[MAXSEQLEN][POSNUM+1], int weighted_avg, int offset_to_use, char offsets[MAXSEQLEN], int start_at_reg_shift, double bound, int avg_max) to void average_score_over_coils3(Sequence seq, double StructureResLike[MAXSEQLEN][POSNUM+1], double StructureCoilLike[MAXSEQLEN][POSNUM+1], double CoilLike[MAXSEQLEN][POSNUM+1], int offset_to_use, char offsets[MAXSEQLEN], int start_at_reg_shift, double bound, int avg_max) replaced void MultiCoilDimensionScore (int mode, Sequence sequence, char lib[MAXFUNCTNUM], double *maxscore, int table, char offsets[MAXSEQLEN], double scores[MAXSEQLEN][POSNUM+1], int offset_to_use, int pairs) by void MultiCoilDimensionScore (int mode, Sequence sequence, char lib[MAXFUNCTNUM], double *maxscore, int table, char offsets[MAXSEQLEN], double scores[MAXSEQLEN][POSNUM+1], int offset_to_use) in PairCoilData: changed else if (i > 1) { /* If there are 2 other tables average them. */ average_many_pprob(i); combine_many_weight(i); } else { fprintf(stderr, "\nCould not make combination table number %d.",i); fprintf(stderr, "\nAll later tables will be unavailable.\n"); *number_tables=i; } to else { fprintf(stderr, "\nCould not make input table number %d.",i); exit(-1); } and if (*number_tables != i) { /* Just check for above where couldn't */ #ifdef AVG_WEIRD_PROBS /* make table. */ calc_weird_pprob_avg(many_pprobp[i], many_pprobs[i]); #else calc_weird_pprob_sum(many_pprobp[i], many_pprobs[i]); #endif } to #ifdef AVG_WEIRD_PROBS /* make table. */ calc_weird_pprob_avg(many_pprobp[i], many_pprobs[i]); #else calc_weird_pprob_sum(many_pprobp[i], many_pprobs[i]); #endif /*******************************ROUND 2 *****************************/ CUT /* #define PAIR_PIR_TXT "/local/bab/pir_pair.txt" */ double many_weights[MAX_TABLE_NUMBER][AANUM][POSNUM], many_weightp[MAX_TABLE_NUMBER][AANUM][AANUM][POSNUM][POSNUM]; double dist_weight[POSNUM]; double prior_probs[NUM_RES_TYPE][POSNUM], prior_probp[NUM_RES_TYPE][NUM_RES_TYPE][POSNUM][POSNUM]; double (*weights)[POSNUM]; double (*weightp)[AANUM][POSNUM][POSNUM]; typedef double real; in switch_tables() cut weights= many_weights[table]; weightp= many_weightp[table]; Cut /* NOTE THAT THE many_pprob variables are globally defined in interface.h. */ /** This gives the current_table probabilities the average of tables 1 and 2 */ void average_many_pprob(int current_table) { int reg1, reg2, res1, res2; for (res1=0; res1