#include #include #include #include #include "scio.h" #include "switches.h" #include "likelihood.h" #include "sc.h" #include "scconst.h" #include "options.h" #include "compute_like.h" #include "interface.h" #include "stats.h" void average_score_over_coils2(Sequence seq, double scores[MAXSEQLEN][POSNUM+1], double PreprocLike[MAXSEQLEN][POSNUM+1], int CoilDiffMethod, int offset_to_use, char offsets[MAXSEQLEN], int start_at_reg_shift) { int i=0, j,k; int start_coil[POSNUM+1]; double total_coil_score[POSNUM+1]; double avg_coil_score[POSNUM+1]; int regist; double total_coil_length[POSNUM +1]; /* A weighted length. */ for (j=0; j0) && (offsets[i] != offsets[i-1]) && start_at_reg_shift && (PreprocLike[i-1][7]>= .001) ) ) { /** If not in a coil (value of -HUGE_VAL signals not in coil). */ if (start_coil[k] != -1) { /* Ended coil at i-1. */ avg_coil_score[k] = total_coil_score[k]/total_coil_length[k]; for (j=start_coil[k]; j0) && (offsets[i] != offsets[i-1]) && start_at_reg_shift && (PreprocLike[i-1][7]>= .001) ) ) { /** If not in a coil (value of -HUGE_VAL signals not in coil). */ if (start_coil[k] != -1) { /* Ended coil at i-1. */ avg_coil_score[k] = total_coil_score[k]/total_coil_length[k]; for (j=start_coil[k]; j 0) { if (like2or3==2) scores[i][(i+j)%POSNUM] = 1 - exp(sc2scores[i][j]); else scores[i][(i+j)%POSNUM] = exp(sc2scores[i][j]); } else scores[i][(i+j)%POSNUM]= 0; } } if (Avg_Coil_Score) average_score_over_coils2(sequence, scores, preproc_like, CoilDiffMethod, offset_to_use,offsets, start_coil_at_reg_shift); for (i=0; i *maxscore) *maxscore = scores[i][7]; }