+ 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;AF=%.3lg", depth, rms_q, 1.-f); // FIXME: not working for triallelic alleles
+ printf("\tDP");
+ // output genotype information; FIXME: to be implmented...
+ for (i = 0; i < n; ++i)
+ printf("\t%d", n_plp[i]);
+ putchar('\n');
+ } 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);
+ }