void sorted_dumper<storage_t,atomic_t>::_dump() { std::ofstream _out; assert(dump_mutex.try_lock()); if(one_file) { _out.open(file_prefix.c_str()); } else { open_next_file(file_prefix.c_str(), &file_index, _out); } out = &_out; unique = distinct = total = max_count = 0; tr.reset(); thread_info[0].writer.write_header(out); exec_join(threads); ary->zero_blocks(0, nb_blocks); // zero out last group of blocks update_stats(); _out.close(); dump_mutex.unlock(); }
void do_it() { // Setup output stream for jellyfish initialisation std::ostream* out_stream = args->verbose ? &cerr : (std::ostream*)0; // Load the jellyfish hash for sequential access hash = jfh->loadHash(true, out_stream); // Create matrix of appropriate size (adds 1 to cvg bins to account for 0) gcp_mx = new ThreadedSparseMatrix<uint64_t>(hash->get_mer_len(), args->cvg_bins + 1, args->threads_arg); // Process batch with worker threads // Process each sequence is processed in a different thread. // In each thread lookup each K-mer in the hash exec_join(args->threads_arg); // Merge the contamination matrix gcp_mx->mergeThreadedMatricies(); }
void do_it() { if (args->verbose) { cerr << "Loading hash..." << endl; } std::ostream* out_stream = args->verbose ? &cerr : (std::ostream*)0; // Load the hashes hash = jfh->loadHash(true, out_stream); if (args->verbose) cerr << endl << "Hash loaded successfully." << endl << "Starting threads..."; exec_join(args->threads); if (args->verbose) cerr << "done." << endl; }