X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam_mcns.h;h=6f1a3109b666da3c59dd056922135513ad38faf3;hb=6dc53c5ab2964e68e8936850d2339d047d2433ef;hp=cff6e57d28047950be347e7d873d940638baa385;hpb=71355852e510ac7937d552117557b9dbf07cd557;p=samtools.git diff --git a/bam_mcns.h b/bam_mcns.h index cff6e57..6f1a310 100644 --- a/bam_mcns.h +++ b/bam_mcns.h @@ -6,8 +6,17 @@ struct __mc_aux_t; typedef struct __mc_aux_t mc_aux_t; +typedef struct { + // O(n) + int ref, alt, alt2; + double f_em, f_naive, f_nielsen; + // O(n^2) + double p_ref, f_exp; +} mc_rst_t; + #define MC_PTYPE_FULL 1 #define MC_PTYPE_COND2 2 +#define MC_PTYPE_FLAT 3 #ifdef __cplusplus extern "C" { @@ -16,11 +25,9 @@ extern "C" { mc_aux_t *mc_init(int n); void mc_init_prior(mc_aux_t *ma, int type, double theta); void mc_destroy(mc_aux_t *ma); - double mc_freq0(int ref, int *n, const bam_pileup1_t **plp, mc_aux_t *ma, int *_ref, int *alt); - double mc_freq_iter(double f0, mc_aux_t *ma); - double mc_freq_post(mc_aux_t *ma); - double mc_ref_prob(mc_aux_t *ma); + int mc_cal(int ref, int *n, const bam_pileup1_t **plp, mc_aux_t *ma, mc_rst_t *rst, int level); int mc_call_gt(const mc_aux_t *ma, double f0, int k); + void mc_dump_afs(mc_aux_t *ma); #ifdef __cplusplus }