+ int q = plp[i][j].b->core.qual;
+ if (q > conf->max_mq) q = conf->max_mq;
+ sqr_sum += q * q;
+ }
+ }
+ rms_q = (int)(sqrt((double)sqr_sum / depth) + .499);
+ printf("DP=%d;MQ=%d", depth, rms_q);
+ if (tot) {
+ printf(";AF=%.3lf", 1. - r.f_em);
+ if (level >= 2) printf(";AFE=%.3lf", 1-r.f_exp);
+ if (conf->flag & MPLP_AFALL)
+ printf(";AF0=%.3lf;AFN=%.3lf", 1-r.f_naive, 1-r.f_nielsen);
+ }
+ printf("\tGT:GQ:DP");
+ if (tot) {
+ for (i = 0; i < n; ++i) {
+ int x = mc_call_gt(ma, r.f_exp, i);
+ printf("\t%c/%c:%d:%d", "10"[((x&3)==2)], "10"[((x&3)>0)], x>>2, n_plp[i]);
+ }
+ } else for (i = 0; i < n; ++i) printf("\t./.:0:0");
+ putchar('\n');
+ if (N % MPLP_AFS_BLOCK == 0) mc_dump_afs(ma);
+ } else {
+ printf("%s\t%d\t%c", h->target_name[tid], pos + 1, (ref && pos < ref_len)? ref[pos] : 'N');
+ for (i = 0; i < n; ++i) {
+ int j;
+ printf("\t%d\t", n_plp[i]);
+ if (n_plp[i] == 0) printf("*\t*");
+ else {
+ for (j = 0; j < n_plp[i]; ++j)
+ pileup_seq(plp[i] + j, pos, ref_len, ref);
+ putchar('\t');
+ for (j = 0; j < n_plp[i]; ++j) {
+ const bam_pileup1_t *p = plp[i] + j;
+ int c = bam1_qual(p->b)[p->qpos] + 33;
+ if (c > 126) c = 126;
+ putchar(c);
+ }