diff --git a/.gitignore b/.gitignore index 05d0f23..ad41635 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/test_y_integration_tests.py b/tests/test_y_integration_tests.py index a08d2c2..88c3376 100644 --- a/tests/test_y_integration_tests.py +++ b/tests/test_y_integration_tests.py @@ -89,4 +89,16 @@ def test_run_train_sig(): config = json.load(f) assert config['ksize'] == int(ksize) assert config['ani_thresh'] == float(ani_thresh) + +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')