X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam_md.c;h=20b1913efa09ce796392885b0f4b831c8c759f4a;hb=d195bcfb6632c68032a89c091c20dc24dd6ded60;hp=a1a6d669885a278d6f330b8afb07e324cd92b310;hpb=5f33ece1c399de9f1522383ea3b94284989c0e3f;p=samtools.git diff --git a/bam_md.c b/bam_md.c index a1a6d66..20b1913 100644 --- a/bam_md.c +++ b/bam_md.c @@ -223,8 +223,10 @@ int bam_prob_realn_core(bam1_t *b, const char *ref, int flag) s = calloc(c->l_qseq, 1); for (i = 0; i < c->l_qseq; ++i) s[i] = bam_nt16_nt4_table[bam1_seqi(seq, i)]; r = calloc(xe - xb, 1); - for (i = xb; i < xe; ++i) + for (i = xb; i < xe; ++i) { + if (ref[i] == 0) { xe = i; break; } r[i-xb] = bam_nt16_nt4_table[bam_nt16_table[(int)ref[i]]]; + } state = calloc(c->l_qseq, sizeof(int)); q = calloc(c->l_qseq, 1); kpa_glocal(r, xe-xb, s, c->l_qseq, qual, &conf, state, q); @@ -313,7 +315,8 @@ int bam_fillmd(int argc, char *argv[]) fprintf(stderr, " -b compressed BAM output\n"); fprintf(stderr, " -S the input is SAM with header\n"); fprintf(stderr, " -A modify the quality string\n"); - fprintf(stderr, " -r read-independent local realignment\n\n"); + fprintf(stderr, " -r compute the BQ tag (without -A) or cap baseQ by BAQ (with -A)\n"); + fprintf(stderr, " -E extended BAQ for better sensitivity but lower specificity\n\n"); return 1; } fp = samopen(argv[optind], mode_r, 0);