-
Notifications
You must be signed in to change notification settings - Fork 8
/
likelihood_cache.h
60 lines (43 loc) · 2.14 KB
/
likelihood_cache.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef LIKELIHOOD_CACHE_H
#define LIKELIHOOD_CACHE_H
#include <stdlib.h>
#include <omp.h>
#include "fisher.h"
#include "ycsq.h"
#define FISHER_CACHE_SIZE 2000
#define YCSQ_CACHE_SIZE 15000
typedef struct FisherCache
{
double cache1[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache2[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache3[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache4[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache5[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache6[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache7[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache8[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache9[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
double cache10[FISHER_CACHE_SIZE * FISHER_CACHE_SIZE];
} FisherCache;
typedef struct LikelihoodCache
{
FisherCache fc;
double ycsq_cache[YCSQ_CACHE_SIZE];
} LikelihoodCache;
int likelihood_cache_prefill(LikelihoodCache *lc,
float homo_base_err, float homo_base_e_err,
float homo_indel_err, float homo_indel_e_err,
float het_base_err, float het_base_e_err,
float het_indel_1_err, float het_indel_e_1_err,
float het_indel_2_err, float het_indel_e_2_err);
double fisher_homo_base(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_homo_indel(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_homo_base_e(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_homo_indel_e(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_het_base(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_het_indel_1(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_het_indel_2(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_het_base_e(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_het_indel_e_1(LikelihoodCache *lc, int w_target, int err, int w_total);
double fisher_het_indel_e_2(LikelihoodCache *lc, int w_target, int err, int w_total);
#endif