From 20d8aaaf8b3c07d9db6560ae06bb0923c1804c8f Mon Sep 17 00:00:00 2001 From: Ben J Woodcroft Date: Wed, 28 Jan 2026 12:13:10 +1000 Subject: [PATCH] Log DIAMOND version before prefilter --- singlem/pipe.py | 2 ++ test/test_pipe.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/singlem/pipe.py b/singlem/pipe.py index a56bfb69..4fbb5987 100644 --- a/singlem/pipe.py +++ b/singlem/pipe.py @@ -386,6 +386,8 @@ def finish_sra_extraction_processes(sra_extraction_processes, sra_extraction_com "STDERR was: %s" % ( cmd, p.returncode, p.stderr.read())) + diamond_version = extern.run("diamond --version").strip() + logging.info("DIAMOND version: %s", diamond_version) logging.info("Filtering sequence files through DIAMOND blastx") try: (diamond_forward_search_results, diamond_reverse_search_results) = DiamondSpkgSearcher( diff --git a/test/test_pipe.py b/test/test_pipe.py index af855af3..4a584a00 100644 --- a/test/test_pipe.py +++ b/test/test_pipe.py @@ -117,9 +117,11 @@ def test_fast_protein_package_prefilter(self): cmd = "%s pipe --sequences %s --otu-table /dev/stdout --assignment-method diamond --singlem-packages %s" % ( path_to_script, n.name, os.path.join(path_to_data,'4.11.22seqs.gpkg.spkg')) + result = subprocess.run(cmd, shell=True, check=True, text=True, capture_output=True) self.assertEqualOtuTable( list([line.split("\t") for line in expected]), - extern.run(cmd).replace(os.path.basename(n.name).replace('.fa',''),'')) + result.stdout.replace(os.path.basename(n.name).replace('.fa',''),'')) + self.assertIn("DIAMOND version:", result.stderr) def test_zstd_forward_input(self): expected = [