         const uint32 align_offset = batch.alignment_start[read_index];
         const uint32 reference_alignment_start = seq_base + align_offset;
 
+        const auto& read_window_clipped = ctx.cigar.read_window_clipped[read_index];
+
         uint16 current_bp_idx = 0;
         uint16 num_errors = 0;
 

                reference_window_clipped.x, reference_window_clipped.y);

    uint16 err = ctx.num_errors[read_index];
    fprintf(stderr, "    number of errors            = [ % 3d ]\n", err);

    fprintf(stderr, "\n");
}

                    if (reference_bp != read_bp)
                    {
                        ctx.cigar.is_snp[idx.read_start + current_bp_idx] = 1;

                        // if we are inside the clipped read window, count this error
                        if (current_bp_idx >= read_window_clipped.x && current_bp_idx <= read_window_clipped.y)
                            num_errors++;
                    }
                }

