bool Process() { if (is_selected) { return kmc->Process(); } else return app_1->Process(); }
//---------------------------------------------------------------------------------- // Main function int _tmain(int argc, _TCHAR* argv[]) { CStopWatch w0, w1; double time1, time2, time3; uint64 n_unique, n_cutoff_min, n_cutoff_max, n_total, n_reads, tmp_size, tmp_size_strict_mem, max_disk_usage, n_total_super_kmers; omp_set_num_threads(1); #ifdef WIN32 _setmaxstdio(2040); #endif if(!parse_parameters(argc, argv)) { usage(); return 0; } if(Params.p_quake) { CApplication<CKmerQuake, KMER_WORDS, true> *app = new CApplication<CKmerQuake, KMER_WORDS, true>(Params); if(!app->Process()) { cout << "Not enough memory or some other error\n"; delete app; return 0; } app->GetStats(time1, time2, time3, n_unique, n_cutoff_min, n_cutoff_max, n_total, n_reads, tmp_size, tmp_size_strict_mem, max_disk_usage, n_total_super_kmers); delete app; } else { CApplication<CKmer, KMER_WORDS, false> *app = new CApplication<CKmer, KMER_WORDS, false>(Params); if(!app->Process()) { cout << "Not enough memory or some other error\n"; delete app; return 0; } app->GetStats(time1, time2, time3, n_unique, n_cutoff_min, n_cutoff_max, n_total, n_reads, tmp_size, tmp_size_strict_mem, max_disk_usage, n_total_super_kmers); delete app; } cout << "1st stage: " << time1 << "s\n"; cout << "2nd stage: " << time2 << "s\n"; if (Params.p_strict_mem) cout << "3rd stage: " << time3 << "s\n"; if (Params.p_strict_mem) cout << "Total : " << (time1 + time2 + time3) << "s\n"; else cout << "Total : " << (time1+time2) << "s\n"; if (Params.p_strict_mem) { cout << "Tmp size : " << tmp_size / 1000000 << "MB\n"; cout << "Tmp size strict memory : " << tmp_size_strict_mem / 1000000 << "MB\n"; //cout << "Tmp total: " << (tmp_size + tmp_size_strict_mem) / 1000000 << "MB\n"; cout << "Tmp total: " << max_disk_usage / 1000000 << "MB\n"; } else cout << "Tmp size : " << tmp_size / 1000000 << "MB\n"; cout << "\nStats:\n"; cout << " No. of k-mers below min. threshold : " << setw(12) << n_cutoff_min << "\n"; cout << " No. of k-mers above max. threshold : " << setw(12) << n_cutoff_max << "\n"; cout << " No. of unique k-mers : " << setw(12) << n_unique << "\n"; cout << " No. of unique counted k-mers : " << setw(12) << n_unique-n_cutoff_min-n_cutoff_max << "\n"; cout << " Total no. of k-mers : " << setw(12) << n_total << "\n"; if(Params.p_file_type != multiline_fasta) cout << " Total no. of reads : " << setw(12) << n_reads << "\n"; else cout << " Total no. of sequences : " << setw(12) << n_reads << "\n"; cout << " Total no. of super-k-mers : " << setw(12) << n_total_super_kmers << "\n"; return 0; }