From 50c9f1f5918501297821d95e30b0207e79db3250 Mon Sep 17 00:00:00 2001 From: mfl15 <144844529+mfl15@users.noreply.github.com> Date: Tue, 20 Feb 2024 10:21:51 -0500 Subject: [PATCH] Make a test of using pre-trained data (#106) * Error working with GTDB database bug * Update test_y_integration_tests.py * Update test_y_integration_tests.py * Update test_y_integration_tests.py --------- Co-authored-by: Maksym --- .gitignore | 1 + tests/{unittests.py => test_unittests.py} | 0 ...ration_tests.py => test_y_integration_tests.py} | 14 ++++++++++++++ 3 files changed, 15 insertions(+) rename tests/{unittests.py => test_unittests.py} (100%) rename tests/{integration_tests.py => test_y_integration_tests.py} (76%) diff --git a/.gitignore b/.gitignore index 05d0f238..ad416352 100644 --- a/.gitignore +++ b/.gitignore @@ -167,3 +167,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +gtdb-rs214-reps.k31_0.9995_pretrained/ \ No newline at end of file diff --git a/tests/unittests.py b/tests/test_unittests.py similarity index 100% rename from tests/unittests.py rename to tests/test_unittests.py diff --git a/tests/integration_tests.py b/tests/test_y_integration_tests.py similarity index 76% rename from tests/integration_tests.py rename to tests/test_y_integration_tests.py index 60a3911f..f2ec197c 100644 --- a/tests/integration_tests.py +++ b/tests/test_y_integration_tests.py @@ -70,3 +70,17 @@ def test_run_yacht(): assert exists('result.xlsx') +def test_run_pretrained_ref_db(): + cmd = "yacht download pretrained_ref_db --database gtdb --db_version rs214 --k 31 --ani_thresh 0.9995 --outfolder ./" + res = subprocess.run(cmd, shell=True, check=True) + assert res.returncode == 0 + +def test_run_yacht_pretrained_ref_db(): + cmd = "yacht run --json ./gtdb-rs214-reps.k31_0.9995_pretrained/gtdb-rs214-reps.k31_0.9995_config.json --sample_file tests/testdata/sample.sig.zip --significance 0.99 --num_threads 32 --min_coverage_list 1 0.6 0.2 0.1 --out ./result_pretrained.xlsx" + res = subprocess.run(cmd, shell=True, check=True) + assert res.returncode == 0 + + assert exists('result_pretrained.xlsx') + + +