]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.7-r607
authorHeng Li <lh3@live.co.uk>
Thu, 8 Jul 2010 18:43:52 +0000 (18:43 +0000)
committerHeng Li <lh3@live.co.uk>
Thu, 8 Jul 2010 18:43:52 +0000 (18:43 +0000)
 * improved the genotype accuracy for indels
 * use the SOAPsnp model for SNP calling by default.

bam_maqcns.c
bam_plcmd.c
bamtk.c

index 51f56a9e5c4a0f58e06b81e0500ff1aaf12a4aad..9a25380f36b77411ecc34336b5a92fe2d2f734d4 100644 (file)
@@ -446,6 +446,7 @@ bam_maqindel_ret_t *bam_maqindel(int n, int pos, const bam_maqindel_opt_t *mi, c
                for (i = 0; i < n_types; ++i) {
                        ka_param_t ap = ka_param_blast;
                        ap.band_width = 2 * types[n_types - 1] + 2;
+                       ap.gap_end = 0;
                        // write ref2
                        for (k = 0, j = left; j <= pos; ++j)
                                ref2[k++] = bam_nt16_nt4_table[bam_nt16_table[(int)ref[j]]];
@@ -490,10 +491,10 @@ bam_maqindel_ret_t *bam_maqindel(int n, int pos, const bam_maqindel_opt_t *mi, c
                                                                if (ref2[x+k] != rs[y+k] && ref2[x+k] < 4) ps += bam1_qual(p->b)[y+k];
                                                        x += len; y += len;
                                                } else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) {
-                                                       if (op == BAM_CINS) ps += mi->q_indel * len;
+                                                       if (op == BAM_CINS && l > 0 && l < n_acigar - 1) ps += mi->q_indel * len;
                                                        y += len;
                                                } else if (op == BAM_CDEL) {
-                                                       ps += mi->q_indel * len;
+                                                       if (l > 0 && l < n_acigar - 1) ps += mi->q_indel * len;
                                                        x += len;
                                                }
                                        }
index d1ea03f896e9ad433c95d33ba1dfe88ad2354aae..84838dd98e1d56c7270ae78225a8023e9c96ca57 100644 (file)
@@ -341,10 +341,11 @@ int bam_pileup(int argc, char *argv[])
     d->max_depth = 0;
        d->tid = -1; d->mask = BAM_DEF_MASK;
        d->c = bam_maqcns_init();
+       d->c->is_soap = 1; // change the default model
        d->ido = bam_maqindel_opt_init();
        while ((c = getopt(argc, argv, "st:f:cT:N:r:l:d:im:gI:G:vM:S2aR:P")) >= 0) {
                switch (c) {
-               case 'a': d->c->is_soap = 1; break;
+               case 'a': d->c->is_soap = 0; break;
                case 's': d->format |= BAM_PLF_SIMPLE; break;
                case 't': fn_list = strdup(optarg); break;
                case 'l': fn_pos = strdup(optarg); break;
@@ -379,7 +380,7 @@ int bam_pileup(int argc, char *argv[])
                fprintf(stderr, "Usage:  samtools pileup [options] <in.bam>|<in.sam>\n\n");
                fprintf(stderr, "Option: -s        simple (yet incomplete) pileup format\n");
                fprintf(stderr, "        -S        the input is in SAM\n");
-               fprintf(stderr, "        -a        use the SOAPsnp model for SNP calling\n");
+               fprintf(stderr, "        -a        use the MAQ model for SNP calling\n");
                fprintf(stderr, "        -2        output the 2nd best call and quality\n");
                fprintf(stderr, "        -i        only show lines/consensus with indels\n");
                fprintf(stderr, "        -m INT    filtering reads with bits in INT [%d]\n", d->mask);
diff --git a/bamtk.c b/bamtk.c
index be126fa62124801755e05e3f1cf9a0fbf52bead5..be1f6b2273ffa15753a1a24e6e983d2dbc964747 100644 (file)
--- a/bamtk.c
+++ b/bamtk.c
@@ -9,7 +9,7 @@
 #endif
 
 #ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.7-18 (r605)"
+#define PACKAGE_VERSION "0.1.7-19 (r607)"
 #endif
 
 int bam_taf2baf(int argc, char *argv[]);