diff --git a/src/lib.rs b/src/lib.rs index f4647156..db1ea13f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -134,6 +134,9 @@ fn do_fastmultigather( } } } else { + if let Some(_) = output_path { + bail!("output path specified, but not running fastmultigather against a rocksdb. See issue #239"); + } match fastmultigather::fastmultigather( query_filenames, siglist_path, diff --git a/src/mastiff_manygather.rs b/src/mastiff_manygather.rs index f83e963c..03e054dc 100644 --- a/src/mastiff_manygather.rs +++ b/src/mastiff_manygather.rs @@ -62,6 +62,7 @@ pub fn mastiff_manygather( Ok(query_sig) => { let mut results = vec![]; if let Some(query_mh) = query_sig.minhash() { + let _ = processed_sigs.fetch_add(1, atomic::Ordering::SeqCst); // Gather! let (counter, query_colors, hash_to_color) = db.prepare_gather_counters(query_mh); diff --git a/src/python/tests/test_multigather.py b/src/python/tests/test_multigather.py index d50ce5c0..3782ab0f 100644 --- a/src/python/tests/test_multigather.py +++ b/src/python/tests/test_multigather.py @@ -172,7 +172,7 @@ def test_simple_read_manifests(runtmp): make_file_list(against_list, [sig2, sig47, sig63]) - runtmp.sourmash("sig","manifest", query, "-o", query_mf) + runtmp.sourmash("sig", "manifest", query, "-o", query_mf) runtmp.sourmash("sig", "manifest", against_list, "-o", against_mf) cwd = os.getcwd() @@ -316,12 +316,14 @@ def test_sig_query(runtmp, capfd, indexed): if indexed: against_list = index_siglist(runtmp, against_list, runtmp.output('db')) g_output = runtmp.output('out.csv') + output_params = ['-o', g_output] else: g_output = runtmp.output('SRR606249.gather.csv') p_output = runtmp.output('SRR606249.prefetch.csv') + output_params = [] runtmp.sourmash('scripts', 'fastmultigather', query, against_list, - '-s', '100000', '-o', g_output) + '-s', '100000', *output_params) captured = capfd.readouterr() print(captured.err) @@ -361,14 +363,11 @@ def test_bad_query(runtmp, capfd, indexed): make_file_list(against_list, [sig2, sig47, sig63]) - output = runtmp.output('out.csv') - if indexed: against_list = index_siglist(runtmp, against_list, runtmp.output('db')) with pytest.raises(utils.SourmashCommandFailed): - runtmp.sourmash('scripts', 'fastmultigather', query_zip, against_list, - '-o', output) + runtmp.sourmash('scripts', 'fastmultigather', query_zip, against_list) captured = capfd.readouterr() print(captured.err) @@ -520,13 +519,12 @@ def test_bad_against_2(runtmp, capfd, zip_query): with open(sig2, 'rb') as fp2: fp.write(fp2.read()) - output = runtmp.output('out.csv') if zip_query: query_list = zip_siglist(runtmp, query_list, runtmp.output('query.zip')) with pytest.raises(utils.SourmashCommandFailed): runtmp.sourmash('scripts', 'fastmultigather', query_list, against_zip, - '-s', '100000', '-o', output) + '-s', '100000') captured = capfd.readouterr() print(captured.err) diff --git a/src/utils.rs b/src/utils.rs index c6266235..a8d30074 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -432,7 +432,7 @@ fn process_prefix_csv( pub fn load_sketches( collection: Collection, selection: &Selection, - report_type: ReportType, + _report_type: ReportType, ) -> Result> { let sketchinfo: Vec = collection .par_iter()