Commit d9a141b3 authored by Mathieu Giraud's avatar Mathieu Giraud

algo/vidjil.cpp: progress bar for clones beyond the clones displayed on stdout

Closes #3302, opens #4031.
parent 5eb2d955
......@@ -4,6 +4,11 @@
using namespace std ;
typedef string junction ;
// Progress bar
#define PROGRESS_POINT 25000
#define PROGRESS_POINT_CLONES 25
#define PROGRESS_LINE 40
// error
#define ERROR_STRING "[error] "
#define WARNING_STRING "[warning] "
......
#include "windowExtractor.h"
#include "segment.h"
// Progress bar
#define PROGRESS_POINT 25000
#define PROGRESS_LINE 40
#include "tools.h"
WindowExtractor::WindowExtractor(MultiGermline *multigermline): out_segmented(NULL), out_unsegmented(NULL), out_unsegmented_detail(NULL), out_affects(NULL),
max_reads_per_window(~0), multigermline(multigermline){
......
......@@ -1345,6 +1345,18 @@ int main (int argc, char **argv)
cout << clone_id_human << endl ;
last_num_clone_on_stdout = num_clone ;
}
else
{
// Progress bar. See the other progress bar in windowExtractor.cpp
if (!(num_clone % PROGRESS_POINT_CLONES))
{
cout << "." ;
if (!(num_clone % (PROGRESS_POINT_CLONES * PROGRESS_LINE)))
cout << setw(10) << num_clone / 1000 << "k clones " << endl;
cout.flush() ;
}
}
//$$ Open CLONE_FILENAME
......@@ -1503,6 +1515,7 @@ int main (int argc, char **argv)
if (num_clone > last_num_clone_on_stdout)
{
cout << endl << endl ;
cout << "#### Clones "
<< "#" << setfill('0') << setw(WIDTH_NB_CLONES) << last_num_clone_on_stdout + 1 << " to "
<< "#" << setfill('0') << setw(WIDTH_NB_CLONES) << num_clone << "..." << endl ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment