Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 40729f58 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

core/stats.cpp: better formatting of << stats

parent eb803cd1
......@@ -21,7 +21,7 @@ void Germline::init(string _code, char _shortcut,
delta_max = _delta_max ;
stats_reads.setLabel(code);
stats_clones.setLabel(code + "-clones");
stats_clones.setLabel("");
}
Germline::Germline(string _code, char _shortcut,
......@@ -258,11 +258,16 @@ void MultiGermline::build_with_one_index(string seed)
void MultiGermline::out_stats(ostream &out)
{
out << " " ;
out << "reads av. len clones av. reads" ;
out << endl ;
for (list<Germline*>::const_iterator it = germlines.begin(); it != germlines.end(); ++it)
{
Germline *germline = *it ;
out << germline->stats_reads ;
out << germline->stats_clones ;
out << endl ;
}
}
......
......@@ -24,13 +24,15 @@ float Stats::getAverageLength()
ostream &operator<<(ostream &out, Stats &stats)
{
out << " " << left << setw(20) << stats.label
<< " ->" << right << setw(9) << stats.nb ;
if (stats.label.size())
out << " " << left << setw(20) << stats.label << " ->" ;
out << right << setw(9) << stats.nb ;
out << " " << setw(5) ;
if (stats.nb)
out << " " << setw(5) << fixed << setprecision(1) << stats.getAverageLength() ;
out << fixed << setprecision(1) << stats.getAverageLength() ;
else
out << "-" ;
out << endl ;
return out;
}
......@@ -99,6 +99,6 @@ void WindowExtractor::out_stats(ostream &out)
{
if (i == TOTAL_SEG_AND_WINDOW)
out << endl;
out << stats[i] ;
out << stats[i] << endl ;
}
}
......@@ -900,8 +900,6 @@ int main (int argc, char **argv)
cout << "Build clone stats" << endl;
windowsStorage->fillStatsClones();
stream_segmentation_info << " # av. length" << endl ;
multigermline->out_stats(stream_segmentation_info);
stream_segmentation_info << endl;
we.out_stats(stream_segmentation_info);
......
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