0
|
1 #ifndef BAM_MAQCNS_H
|
|
2 #define BAM_MAQCNS_H
|
|
3
|
|
4 #include "glf.h"
|
|
5
|
|
6 struct __bmc_aux_t;
|
|
7
|
|
8 typedef struct {
|
|
9 float het_rate, theta;
|
|
10 int n_hap, cap_mapQ;
|
|
11
|
|
12 float eta, q_r;
|
|
13 double *fk, *coef;
|
|
14 double *lhet;
|
|
15 struct __bmc_aux_t *aux;
|
|
16 } bam_maqcns_t;
|
|
17
|
|
18 typedef struct {
|
|
19 int q_indel;
|
|
20 float r_indel;
|
|
21 // hidden parameters, unchangeable from command line
|
|
22 int mm_penalty, indel_err, ambi_thres;
|
|
23 } bam_maqindel_opt_t;
|
|
24
|
|
25 typedef struct {
|
|
26 int indel1, indel2;
|
|
27 int cnt1, cnt2, cnt_anti;
|
|
28 int cnt_ref, cnt_ambi;
|
|
29 char *s[2];
|
|
30 //
|
|
31 int gt, gl[2];
|
|
32 int q_cns, q_ref;
|
|
33 } bam_maqindel_ret_t;
|
|
34
|
|
35 #ifdef __cplusplus
|
|
36 extern "C" {
|
|
37 #endif
|
|
38
|
|
39 bam_maqcns_t *bam_maqcns_init();
|
|
40 void bam_maqcns_prepare(bam_maqcns_t *bm);
|
|
41 void bam_maqcns_destroy(bam_maqcns_t *bm);
|
|
42 glf1_t *bam_maqcns_glfgen(int n, const bam_pileup1_t *pl, uint8_t ref_base, bam_maqcns_t *bm);
|
|
43 uint32_t bam_maqcns_call(int n, const bam_pileup1_t *pl, bam_maqcns_t *bm);
|
|
44 // return: cns<<28 | cns2<<24 | mapQ<<16 | cnsQ<<8 | cnsQ2
|
|
45 uint32_t glf2cns(const glf1_t *g, int q_r);
|
|
46
|
|
47 bam_maqindel_opt_t *bam_maqindel_opt_init();
|
|
48 bam_maqindel_ret_t *bam_maqindel(int n, int pos, const bam_maqindel_opt_t *mi, const bam_pileup1_t *pl, const char *ref,
|
|
49 int _n_types, int *_types);
|
|
50 void bam_maqindel_ret_destroy(bam_maqindel_ret_t*);
|
|
51
|
|
52 #ifdef __cplusplus
|
|
53 }
|
|
54 #endif
|
|
55
|
|
56 #endif
|