X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=bam_maqcns.c;h=71c2185df0f27d53f74192d1d90625ca7ccb14ac;hb=a7dfcd368cda94d5847d3f2b42d4288399d77835;hp=7aed741ca9c5df15df51c0d72af743f23388ef0f;hpb=321c3f44bab98c30840502aa9cda97b3fdb9b27f;p=samtools.git diff --git a/bam_maqcns.c b/bam_maqcns.c index 7aed741..71c2185 100644 --- a/bam_maqcns.c +++ b/bam_maqcns.c @@ -399,6 +399,10 @@ bam_maqindel_ret_t *bam_maqindel(int n, int pos, const bam_maqindel_opt_t *mi, c left = pos > INDEL_WINDOW_SIZE? pos - INDEL_WINDOW_SIZE : 0; right = pos + INDEL_WINDOW_SIZE; if (types[0] < 0) right -= types[0]; + // in case the alignments stand out the reference + for (i = pos; i < right; ++i) + if (ref[i] == 0) break; + right = i; } { // the core part char *ref2, *rs, *inscns = 0;