diff --git a/partitioning/fast_clustering_t.cpp b/partitioning/fast_clustering_t.cpp index dfbad00f88353968caeed32f1aa8a4ecb9821380..180e4bea6542384209c915f9210ffbc069f393f6 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"; + } }