From 1257e4372c5c29d421871db2ed12a0edd8556c37 Mon Sep 17 00:00:00 2001 From: Tianhao-Gu Date: Mon, 19 Aug 2024 10:54:51 -0500 Subject: [PATCH] round time --- src/loaders/compute_tools/checkm2/checkm2.py | 2 +- src/loaders/compute_tools/eggnog/eggnog.py | 2 +- src/loaders/compute_tools/gtdb_tk/gtdb_tk.py | 2 +- src/loaders/compute_tools/mash/mash.py | 2 +- src/loaders/compute_tools/microtrait/microtrait.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/loaders/compute_tools/checkm2/checkm2.py b/src/loaders/compute_tools/checkm2/checkm2.py index 3cb8a8be..5b89cbea 100644 --- a/src/loaders/compute_tools/checkm2/checkm2.py +++ b/src/loaders/compute_tools/checkm2/checkm2.py @@ -80,7 +80,7 @@ def _run_checkm2( "comment": "diamond_db, ver unknown", }, 'ids_to_files': make_json_serializable(ids_to_files), - 'run_time': run_time, + 'run_time': round(run_time, 2), 'batch_size': size, } create_tool_metadata(output_dir, metadata) diff --git a/src/loaders/compute_tools/eggnog/eggnog.py b/src/loaders/compute_tools/eggnog/eggnog.py index 37f76112..fa1be97c 100644 --- a/src/loaders/compute_tools/eggnog/eggnog.py +++ b/src/loaders/compute_tools/eggnog/eggnog.py @@ -60,7 +60,7 @@ def _run_eggnog_single( "reference_db": { "version": "5.0.2", }, - 'run_time': run_time, + 'run_time': round(run_time, 2), 'batch_size': 1, } create_tool_metadata(output_dir, metadata) diff --git a/src/loaders/compute_tools/gtdb_tk/gtdb_tk.py b/src/loaders/compute_tools/gtdb_tk/gtdb_tk.py index 6d1d6c51..79d260d3 100644 --- a/src/loaders/compute_tools/gtdb_tk/gtdb_tk.py +++ b/src/loaders/compute_tools/gtdb_tk/gtdb_tk.py @@ -160,7 +160,7 @@ def _run_gtdb_tk( "version": "release214", }, 'ids_to_files': make_json_serializable(ids_to_files), - 'run_time': run_time, + 'run_time': round(run_time, 2), 'batch_size': size,} create_tool_metadata(output_dir, metadata) diff --git a/src/loaders/compute_tools/mash/mash.py b/src/loaders/compute_tools/mash/mash.py index 9e946afa..cb56c4b6 100644 --- a/src/loaders/compute_tools/mash/mash.py +++ b/src/loaders/compute_tools/mash/mash.py @@ -55,7 +55,7 @@ def _run_mash_single( 'tool_name': 'mash', 'version': '2.0', 'command': command, - 'run_time': run_time, + 'run_time': round(run_time, 2), 'batch_size': 1, } create_tool_metadata(output_dir, metadata) diff --git a/src/loaders/compute_tools/microtrait/microtrait.py b/src/loaders/compute_tools/microtrait/microtrait.py index a8b3ba8a..14a05db1 100644 --- a/src/loaders/compute_tools/microtrait/microtrait.py +++ b/src/loaders/compute_tools/microtrait/microtrait.py @@ -283,7 +283,7 @@ def _run_microtrait( 'tool_name': 'microtrait', 'version': 'None', 'command': 'None - R script', - 'run_time': run_time, + 'run_time': round(run_time, 2), 'batch_size': 1, } create_tool_metadata(genome_dir, metadata)