1 /* ==========================================================================
5 * author: Wong Swee Seong
8 * gapped and ungapped extension for string matching
10 * ==========================================================================*/
13 #ifndef _HSP_statistic_
14 #define _HSP_statistic_
23 #define uint4 uint32_t
25 #define uint8 uint64_t
27 #define uint2 uint16_t
30 typedef struct stat__score_block
32 int match
, mismatch
, gapOpen
, gapExt
;
35 typedef struct stat__Xdropoffs
37 double ungapXdropoff
, gapXdropoff
, gapXdropoffFinal
;
40 void initializeHSPstatistic(uint8 databaseSize
, uint8 numOfSequences
, uint8 minSeqLength
, double *dbCharProb
,
41 uint8 querySize
, uint8 numOfContext
, double *queryCharProb
, int scoringMatrix
[16][16]);
42 void printHSPstatistic(FILE * outFile
);
43 int4
calcUngapCutoffScore();
44 int4
calcGapCutoffScore();
45 int4
getUngapXdropoff();
46 int4
getGapXdropoff();
47 int4
getGapXdropoffFinal();
49 int4
stat_ungapNormalized2nominal(double normalizedScore
);
50 double stat_ungapNominal2normalized(int4 nominalScore
);
51 double stat_ungapCalcEvalue(double normalizedScore
);
52 int4
stat_ungapEvalue2nominal(double evalue
);
53 double stat_gapNominal2normalized(int4 nominalScore
);
54 int4
stat_gapNormalized2nominal(double normalizedScore
);
55 double stat_gapCalcEvalue(double normalizedScore
);
56 int4
stat_gapEvalue2nominal(double evalue
);