Commit b08a0c04 authored by Mathieu Giraud's avatar Mathieu Giraud

vidjil.cpp: computing clone labels, comments

parent 62805fd6
...@@ -1009,6 +1009,9 @@ int main (int argc, char **argv) ...@@ -1009,6 +1009,9 @@ int main (int argc, char **argv)
ofstream out_clone(clone_file_name.c_str()); ofstream out_clone(clone_file_name.c_str());
Germline *segmented_germline = windowsStorage->getGermline(it->first); Germline *segmented_germline = windowsStorage->getGermline(it->first);
//$$ Computing labels
// Clone label
ostringstream oss; ostringstream oss;
oss << "clone-" << setfill('0') << setw(WIDTH_NB_CLONES) << num_clone oss << "clone-" << setfill('0') << setw(WIDTH_NB_CLONES) << num_clone
<< "--" << segmented_germline->code << "--" << segmented_germline->code
...@@ -1017,13 +1020,15 @@ int main (int argc, char **argv) ...@@ -1017,13 +1020,15 @@ int main (int argc, char **argv)
string clone_id = oss.str(); string clone_id = oss.str();
cout << "Clone #" << right << setfill('0') << setw(WIDTH_NB_CLONES) << num_clone ; // Clone label -- Human readable information (is it really useful ?)
cout << " – " << setfill(' ') << setw(WIDTH_NB_READS) << clone_nb_reads << " reads" ; ostringstream oss_human;
cout << " – " << setprecision(3) << 100 * (float) clone_nb_reads / nb_segmented << "% " ; oss_human << "#### Clone #" << right << setfill('0') << setw(WIDTH_NB_CLONES) << num_clone
<< " – " << setfill(' ') << setw(WIDTH_NB_READS) << clone_nb_reads << " reads"
cout << " – " << 100 * (float) clone_nb_reads * compute_normalization_one(norm_list, clone_nb_reads) / nb_segmented << "% " << " – " << setprecision(3) << 100 * (float) clone_nb_reads / nb_segmented << "% "
<< compute_normalization_one(norm_list, clone_nb_reads) << " "; << " – " << 100 * (float) clone_nb_reads * compute_normalization_one(norm_list, clone_nb_reads) / nb_segmented << "% "
cout << endl ; << compute_normalization_one(norm_list, clone_nb_reads) << " " ;
string clone_id_human = oss_human.str();
cout << clone_id_human << endl ;
//$$ Output window //$$ Output window
......
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