X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam2bcf_indel.c;h=ab9e83ca8f712ae7d7975d67b94b10c702e64908;hb=685647d11f95cc490f13ad6ce708811439c1f867;hp=5142b3e100aa96a7ab598a95b9953aa4c6034289;hpb=4efe4317c377019fbb64bcfae519403a3a9d1f5f;p=samtools.git diff --git a/bam2bcf_indel.c b/bam2bcf_indel.c index 5142b3e..ab9e83c 100644 --- a/bam2bcf_indel.c +++ b/bam2bcf_indel.c @@ -161,6 +161,11 @@ int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_calla if (j > max_rd_len) max_rd_len = j; } } + // To prevent long stretches of N's to be mistaken for indels (sometimes thousands of bases), + // check the number of N's in the sequence and skip places where half or more reference bases are Ns. + int nN=0; for (i=pos; i-posi ) return -1; + ks_introsort(uint32_t, m, aux); // squeeze out identical types for (i = 1, n_types = 1; i < m; ++i)