]> git.donarmstrong.com Git - samtools.git/blobdiff - bam2bcf_indel.c
fixed a bug in printing MNPs
[samtools.git] / bam2bcf_indel.c
index 8b80e3fc55d79751f0866814d87ce52cba39b858..790f59e5e886eed9f1d07b59c816b6188cff71f8 100644 (file)
@@ -625,6 +625,7 @@ int bcf_call_mnp_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_calla
                                seqQ = _seqQ[K];
                                tmp = sc[0]>>6 & 0xff;
                                indelQ = tmp > 111? 0 : (int)((1. - tmp/111.) * indelQ + .499); // reduce indelQ
+                               if (indelQ > seqQ) indelQ = seqQ; // this is different from indel calling!
                                p->aux = (sc[0]&0x3f)<<16 | seqQ<<8 | indelQ;
                                sumq[sc[0]&0x3f] += indelQ < seqQ? indelQ : seqQ;
                        }