@@ -29,6 +29,7 @@ void ParseBin(int argc, char* argv[], cxxargs::Arguments &args) {
29
29
args.add_short_argument <std::string>(' a' , " Relative abundances estimates from mSWEEP." );
30
30
args.add_short_argument <std::string>(' i' , " Group identifiers file used with the mSWEEP call." );
31
31
args.set_not_required (' i' );
32
+ args.add_short_argument <size_t >(' t' , " Number of threads to use (default: 1)." , (size_t )1 );
32
33
args.add_long_argument <std::string>(" probs" , " Posterior probabilities from mSWEEP." );
33
34
args.add_long_argument <std::string>(" merge-mode" , " How to merge paired-end alignments from Themisto (default: intersection)." , " intersection" );
34
35
args.add_long_argument <std::vector<std::string>>(" groups" , " Which reference groups to bin reads to (default: all)." );
@@ -113,7 +114,12 @@ void Bin(const cxxargs::Arguments &args, bool extract_bins) {
113
114
std::vector<double > abundances;
114
115
cxxio::In msweep_abundances (args.value <std::string>(' a' ));
115
116
mGEMS::ReadAbundances (msweep_abundances.stream (), &abundances, &groups);
116
-
117
+
118
+ #if defined(MGEMS_OPENMP_SUPPORT) && (MGEMS_OPENMP_SUPPORT) == 1
119
+ size_t n_threads = args.value <size_t >(' t' );
120
+ omp_set_num_threads (n_threads);
121
+ #endif
122
+
117
123
std::vector<std::istream*> themisto_alns;
118
124
for (uint32_t i = 0 ; i < args.value <std::vector<std::string>>(" themisto-alns" ).size (); ++i) {
119
125
cxxio::In (args.value <std::vector<std::string>>(" themisto-alns" )[i]);
0 commit comments