]> git.donarmstrong.com Git - samtools.git/blobdiff - bam2bcf.c
* modify the filtering rule: also filter SNPs around filtered indels
[samtools.git] / bam2bcf.c
index fe447e6aafb610fb984d3e07c9c507a5572630ca..45a0ccc36592edbcd8647e731a6476900c4b2c31 100644 (file)
--- a/bam2bcf.c
+++ b/bam2bcf.c
@@ -209,13 +209,13 @@ int bcf_call2bcf(int tid, int pos, bcf_call_t *bc, bcf1_t *b, bcf_callret1_t *bc
                }
                kputc('\0', &s);
        } else if (bc->ori_ref == B2B_REF_MNP) {
-               for (j = 0; j < bca->indelreg; ++j) kputc(ref[pos+1+j], &s);
+               for (j = 0; j < bca->indelreg; ++j) kputc(ref[pos+j], &s);
                kputc('\0', &s);
                for (i = 1; i < 4; ++i) {
                        if (bc->a[i] < 0) break;
                        if (i > 1) kputc(',', &s);
                        for (j = 0; j < bca->indelreg; ++j)
-                               kputc("ACGT"[bca->indel_types[i]>>2*i&3], &s);
+                               kputc("ACGT"[bca->indel_types[i]>>2*j&3], &s);
                }
                kputc('\0', &s);
        } else { // a SNP