X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=wiggle.cpp;h=b0cb7d31cfc1b5936278d2cb30f6dac54ccb75bb;hb=6eec553ba4ab1cb1c6f48cd14d9e5c92c7d85798;hp=65a3d4a783e1ffd44e3b534c890113138aff8aee;hpb=fc69cf6af24c0550e55447fc82f01cb6f90c1c42;p=rsem.git diff --git a/wiggle.cpp b/wiggle.cpp index 65a3d4a..b0cb7d3 100644 --- a/wiggle.cpp +++ b/wiggle.cpp @@ -1,11 +1,13 @@ #include #include #include +#include #include #include "sam/bam.h" #include "sam/sam.h" +#include "utils.h" #include "wiggle.h" void add_bam_record_to_wiggle(const bam1_t *b, Wiggle& wiggle) { @@ -42,7 +44,7 @@ void build_wiggles(const std::string& bam_filename, memset(used, 0, sizeof(bool) * header->n_targets); int cur_tid = -1; //current tid; - int cnt = 0; + HIT_INT_TYPE cnt = 0; bam1_t *b = bam_init1(); Wiggle wiggle; while (samread(bam_in, b) >= 0) { @@ -57,7 +59,7 @@ void build_wiggles(const std::string& bam_filename, } add_bam_record_to_wiggle(b, wiggle); ++cnt; - if (cnt % 1000000 == 0) fprintf(stderr, "%d FIN\n", cnt); + if (cnt % 1000000 == 0) std::cout<< cnt<< std::endl; } if (cur_tid >= 0) { used[cur_tid] = true; processor.process(wiggle); }