]> git.donarmstrong.com Git - samtools.git/blob - bam_mcns.h
supposedly this is THE correct implementation, but more testing is needed
[samtools.git] / bam_mcns.h
1 #ifndef BAM_MCNS_H
2 #define BAM_MCNS_H
3
4 #include "bam.h"
5
6 struct __mc_aux_t;
7 typedef struct __mc_aux_t mc_aux_t;
8
9 typedef struct {
10         // O(n)
11         int ref, alt, alt2;
12         double f_em, f_naive, f_nielsen;
13         // O(n^2)
14         double p_ref, f_exp;
15 } mc_rst_t;
16
17 #define MC_PTYPE_FULL  1
18 #define MC_PTYPE_COND2 2
19 #define MC_PTYPE_FLAT  3
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25         mc_aux_t *mc_init(int n);
26         void mc_init_prior(mc_aux_t *ma, int type, double theta);
27         void mc_destroy(mc_aux_t *ma);
28         int mc_cal(int ref, int *n, const bam_pileup1_t **plp, mc_aux_t *ma, mc_rst_t *rst, int level);
29         int mc_call_gt(const mc_aux_t *ma, double f0, int k);
30         void mc_dump_afs(mc_aux_t *ma);
31
32 #ifdef __cplusplus
33 }
34 #endif
35
36 #endif