]> git.donarmstrong.com Git - samtools.git/blob - bam2bcf.h
* samtools-0.1.8-11 (r672)
[samtools.git] / bam2bcf.h
1 #ifndef BAM2BCF_H
2 #define BAM2BCF_H
3
4 #include <stdint.h>
5 #include "bcftools/bcf.h"
6
7 struct __bcf_callaux_t;
8 typedef struct __bcf_callaux_t bcf_callaux_t;
9
10 typedef struct {
11         int depth, d[4];
12         int dsum[2], d2sum[2];
13         uint64_t sum_Q2;
14         float p[25], esum[5];
15 } bcf_callret1_t;
16
17 typedef struct {
18         int a[5]; // alleles: ref, alt, alt2, alt3
19         int n, n_alleles, shift, ori_ref, unseen;
20         int d[4], depth, rmsQ;
21         double davg[2], dstd[2];
22         uint8_t *PL;
23 } bcf_call_t;
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29         bcf_callaux_t *bcf_call_init(double theta, int min_baseQ);
30         void bcf_call_destroy(bcf_callaux_t *bca);
31         int bcf_call_glfgen(int _n, const bam_pileup1_t *pl, int ref_base /*4-bit*/, bcf_callaux_t *bca, bcf_callret1_t *r);
32         int bcf_call_combine(int n, const bcf_callret1_t *calls, int ref_base /*4-bit*/, bcf_call_t *call);
33         int bcf_call2bcf(int tid, int pos, bcf_call_t *bc, bcf1_t *b);
34
35 #ifdef __cplusplus
36 }
37 #endif
38
39 #endif