]> git.donarmstrong.com Git - samtools.git/blobdiff - bam2bcf.c
* samtools-0.1.9-5 (r802)
[samtools.git] / bam2bcf.c
index be8cf1fe529a735800947b80b2a52c7fbaadb2d4..f7c48aa94f32e417d718371ee0c621b906ea0b85 100644 (file)
--- a/bam2bcf.c
+++ b/bam2bcf.c
@@ -20,7 +20,7 @@ bcf_callaux_t *bcf_call_init(double theta, int min_baseQ)
        if (theta <= 0.) theta = CALL_DEFTHETA;
        bca = calloc(1, sizeof(bcf_callaux_t));
        bca->capQ = 60;
-       bca->openQ = 40; bca->extQ = 20; bca->tandemQ = 80;
+       bca->openQ = 40; bca->extQ = 20; bca->tandemQ = 100;
        bca->min_baseQ = min_baseQ;
        bca->e = errmod_init(1. - theta);
        return bca;
@@ -181,9 +181,11 @@ int bcf_call2bcf(int tid, int pos, bcf_call_t *bc, bcf1_t *b, bcf_callret1_t *bc
                kputc(ref[pos], &s);
                for (i = 1; i < 4; ++i) {
                        if (bc->a[i] < 0) break;
-                       if (i > 1) kputc(',', &s);
+                       if (i > 1) {
+                               kputc(',', &s); kputc(ref[pos], &s);
+                       }
                        if (bca->indel_types[bc->a[i]] < 0) { // deletion
-                               for (j = -bca->indel_types[bc->a[i]]; j < bca->indelreg; ++i)
+                               for (j = -bca->indel_types[bc->a[i]]; j < bca->indelreg; ++j)
                                        kputc(ref[pos+1+j], &s);
                        } else { // insertion; cannot be a reference unless a bug
                                char *inscns = &bca->inscns[bc->a[i] * bca->maxins];