]> git.donarmstrong.com Git - samtools.git/blobdiff - bam2bcf.h
* samtools-0.1.10-6 (r839)
[samtools.git] / bam2bcf.h
index e0673e5e868b3ab4babcd0726f76ff301c42e9be..4ea48095e3566ed1d55fa96bdcf873b4ba0da83f 100644 (file)
--- a/bam2bcf.h
+++ b/bam2bcf.h
@@ -5,7 +5,11 @@
 #include "errmod.h"
 #include "bcftools/bcf.h"
 
-#define B2B_INDEL_NULL 10000
+#define B2B_INDEL_NULL 0x7fff
+#define B2B_MAX_MNP    4 // cannot be larger than 4!!!
+#define B2B_MNP_WIN    10
+#define B2B_REF_INDEL  (-1)
+#define B2B_REF_MNP    (-2)
 
 typedef struct __bcf_callaux_t {
        int capQ, min_baseQ;
@@ -13,7 +17,7 @@ typedef struct __bcf_callaux_t {
        // for internal uses
        int max_bases;
        int indel_types[4];
-       int maxins, indelreg;
+       int maxins, indelreg, last_mnp_pos;
        char *inscns;
        uint16_t *bases;
        errmod_t *e;
@@ -21,15 +25,15 @@ typedef struct __bcf_callaux_t {
 } bcf_callaux_t;
 
 typedef struct {
-       int depth, qsum[4];
+       int depth, ori_depth, qsum[4];
        int anno[16];
        float p[25];
 } bcf_callret1_t;
 
 typedef struct {
        int a[5]; // alleles: ref, alt, alt2, alt3
-       int n, n_alleles, shift, ori_ref, unseen;
-       int anno[16], depth;
+       int n, n_alleles, shift, ori_ref, unseen; // ori_ref can be B2B_REF_INDEL/B2B_REF_MNP
+       int anno[16], depth, ori_depth;
        uint8_t *PL;
 } bcf_call_t;
 
@@ -45,6 +49,7 @@ extern "C" {
                                         const bcf_callaux_t *bca, const char *ref);
        int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_callaux_t *bca, const char *ref,
                                                  const void *rghash);
+       int bcf_call_mnp_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_callaux_t *bca, const char *ref);
 
 #ifdef __cplusplus
 }