X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam2bcf_indel.c;h=9933586ae0c21b9a1cb5f45fef3b56e6819343ed;hb=fdec84077cb242e672bd3a62292c236edeb6236a;hp=30b3f46f8431a184fc50524e8f339b70363f6af5;hpb=17e151305384832457424bde6fac93e2f022cc8a;p=samtools.git diff --git a/bam2bcf_indel.c b/bam2bcf_indel.c index 30b3f46..9933586 100644 --- a/bam2bcf_indel.c +++ b/bam2bcf_indel.c @@ -175,7 +175,7 @@ int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_calla // 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 ) { free(aux); return -1; } + if ( nN*2>(i-pos) ) { free(aux); return -1; } ks_introsort(uint32_t, m, aux); // squeeze out identical types