X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=samtools.git;a=blobdiff_plain;f=bcftools%2Fcall1.c;h=3cc464949eb69e630ee7905c96d4f8050b1b569c;hp=b2d7d4a197b112ea10c6caf3ad4a9a13d95b1298;hb=0f906dafb2ad22371a753557562ef95c3034480d;hpb=b301e959d73eee0955c57004f344f17af00703f4 diff --git a/bcftools/call1.c b/bcftools/call1.c index b2d7d4a..3cc4649 100644 --- a/bcftools/call1.c +++ b/bcftools/call1.c @@ -8,6 +8,11 @@ #include "kstring.h" #include "time.h" +#ifdef _WIN32 +#define srand48(x) srand(x) +#define lrand48() rand() +#endif + #include "kseq.h" KSTREAM_INIT(gzFile, gzread, 16384) @@ -126,7 +131,6 @@ static int update_bcf1(bcf1_t *b, const bcf_p1aux_t *pa, const bcf_p1rst_t *pr, if (em[5] >= 0 && em[6] >= 0) ksprintf(&s, ";AF2=%.4g,%.4g", 1 - em[5], 1 - em[6]); if (em[7] >= 0) ksprintf(&s, ";LRT=%.3g", em[7]); if (em[8] >= 0) ksprintf(&s, ";LRT2=%.3g", em[8]); - //if (em[9] >= 0) ksprintf(&s, ";LRT1=%.3g", em[9]); } if (cons_llr > 0) { ksprintf(&s, ";CLR=%d", cons_llr); @@ -269,6 +273,8 @@ static void write_header(bcf_hdr_t *h) kputs("##INFO=\n", &str); if (!strstr(str.s, "##INFO=\n", &str); + if (!strstr(str.s, "##INFO=\n", &str); if (!strstr(str.s, "##FORMAT=\n", &str); if (!strstr(str.s, "##FORMAT=\n", &str); if (!strstr(str.s, "##FORMAT=\n", &str); + kputs("##FORMAT=\n", &str); h->l_txt = str.l + 1; h->txt = str.s; } @@ -490,7 +496,7 @@ int bcfview(int argc, char *argv[]) if (!(l > begin && end > b->pos)) continue; } ++n_processed; - if (vc.flag & VC_QCNT) { // summarize the difference + if ((vc.flag & VC_QCNT) && !is_indel) { // summarize the difference int x = bcf_min_diff(b); if (x > 255) x = 255; if (x >= 0) ++qcnt[x];