]> git.donarmstrong.com Git - samtools.git/blob - bam_mcns.h
* samtools-0.1.8-6 (r638)
[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 PD, p_ref, f_exp;
15         // O(n^3)
16         double f_map, p_map; // map=maximum a posterior
17 } mc_rst_t;
18
19 #define MC_PTYPE_FULL  1
20 #define MC_PTYPE_COND2 2
21 #define MC_PTYPE_FLAT  3
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27         mc_aux_t *mc_init(int n);
28         void mc_init_prior(mc_aux_t *ma, int type, double theta);
29         void mc_destroy(mc_aux_t *ma);
30         int mc_cal(int ref, int *n, const bam_pileup1_t **plp, mc_aux_t *ma, mc_rst_t *rst, int level);
31         int mc_call_gt(const mc_aux_t *ma, double f0, int k);
32         void mc_dump_afs(mc_aux_t *ma);
33
34 #ifdef __cplusplus
35 }
36 #endif
37
38 #endif