Commit 66535190 authored by Mathieu Giraud's avatar Mathieu Giraud

core/germline.{h,cpp}: Germline and MultiGermline use Stats

parent 388a7628
......@@ -17,6 +17,8 @@ Germline::Germline(string _code, char _shortcut,
delta_max = _delta_max ;
build_index(seed);
stats.setLabel(code);
}
......@@ -39,6 +41,8 @@ Germline::Germline(Fasta _rep_5, Fasta _rep_4, Fasta _rep_3,
delta_max = _delta_max ;
build_index(seed);
stats.setLabel(code);
}
void Germline::build_index(string seed)
......@@ -105,3 +109,11 @@ void MultiGermline::load_default_set()
}
void MultiGermline::out_stats(ostream &out)
{
for (list<Germline*>::const_iterator it = germlines.begin(); it != germlines.end(); ++it)
{
Germline *germline = *it ;
out << germline->stats ;
}
}
......@@ -6,6 +6,7 @@
#include <list>
#include "kmeraffect.h"
#include "kmerstore.h"
#include "stats.h"
using namespace std;
......@@ -48,6 +49,8 @@ class Germline {
int delta_min;
int delta_max;
Stats stats;
};
......@@ -65,6 +68,8 @@ class MultiGermline {
void insert(Germline *germline);
void load_default_set();
void out_stats(ostream &out);
};
......
......@@ -221,6 +221,7 @@ KmerSegmenter::KmerSegmenter(Sequence seq, MultiGermline *multigermline)
{
// Yes, it is segmented
segmented_germline = germline;
germline->stats.insert(length);
reversed = (strand == -1);
because = reversed ? SEG_MINUS : SEG_PLUS ;
......
......@@ -854,6 +854,8 @@ int main (int argc, char **argv)
stream_segmentation_info << " # av. length" << endl ;
multigermline->out_stats(stream_segmentation_info);
for (int i=0; i<STATS_SIZE; i++)
{
stream_segmentation_info << " " << left << setw(20) << segmented_mesg[i]
......
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