From 68fd6549fbdf6c09385e93a4def89c78e36fb23c Mon Sep 17 00:00:00 2001 From: oboulle <olivier.boulle@inria.fr> Date: Mon, 12 Aug 2024 14:29:54 +0200 Subject: [PATCH] progression print --- partitioning/fast_clustering_t.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/partitioning/fast_clustering_t.cpp b/partitioning/fast_clustering_t.cpp index dfbad00..180e4be 100755 --- a/partitioning/fast_clustering_t.cpp +++ b/partitioning/fast_clustering_t.cpp @@ -87,6 +87,9 @@ void process_file_part(const std::string& input_filename, int part_id, int start // Process the lines in the file part std::string read_name; std::string sequence; + int read_count = 0; + int total_reads = (end_line - start_line)/4; + int step_count = 0; // process the lines in the file part, add 4 lines to the i counter each loop for (int i = start_line; i < end_line; i+=4) { @@ -104,6 +107,14 @@ void process_file_part(const std::string& input_filename, int part_id, int start // find the position fo the primer and get the bases following it std::string cluster_id = get_cluster_id(sequence, seq_to_find, split_level); + read_count += 1; + + if (read_count >= total_reads/10 && part_id == 0){ + read_count = 0; + step_count += 1; + std::cout << "thread " << part_id << " : " << step_count <<"0%" << std::endl; + } + if (cluster_id == "None") { continue; // ignore the read } @@ -118,6 +129,7 @@ void process_file_part(const std::string& input_filename, int part_id, int start return; } output_file << ">" << read_name << "\n" << sequence << "\n"; + } } -- GitLab