modified: makefile
[GalaxyCodeBases.git] / BGI / soap_src / soap_builder / HSPstatistic.h
blob431c8c35c2e22050df88ab458df745342188135b
1 /* ==========================================================================
3 * HSPstatistic.h
5 * author: Wong Swee Seong
6 * date: 30-03-2006
8 * gapped and ungapped extension for string matching
9 *
10 * ==========================================================================*/
13 #ifndef _HSP_statistic_
14 #define _HSP_statistic_
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 #include <stdint.h>
22 #define int4 int32_t
23 #define uint4 uint32_t
24 #define int8 int64_t
25 #define uint8 uint64_t
26 #define int2 int16_t
27 #define uint2 uint16_t
30 typedef struct stat__score_block
32 int match, mismatch, gapOpen, gapExt;
33 } STAT_scoreBlock;
35 typedef struct stat__Xdropoffs
37 double ungapXdropoff, gapXdropoff, gapXdropoffFinal;
38 } STAT_Xdropoffs;
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);
58 #ifdef __cplusplus
60 #endif
62 #endif