From b1e0c239aed2ee4377b9ee47af2ed0ae41c8ebba Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 10 Mar 2021 15:45:44 +0300 Subject: Rename "covariates" to "covars" in endpoints for consistency --- gn3/api/gemma.py | 2 +- tests/integration/test_gemma.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gn3/api/gemma.py b/gn3/api/gemma.py index f7c30bc..2bdaf26 100644 --- a/gn3/api/gemma.py +++ b/gn3/api/gemma.py @@ -244,7 +244,7 @@ def compute_gwa_with_loco_maf(k_filename, maf, token): message="Metadata file non-existent!") -@gemma.route("/gwa-compute//loco/covariates/maf//", +@gemma.route("/gwa-compute//loco/covars/maf//", methods=["POST"]) def compute_gwa_with_loco_covar(k_filename, maf, token): """Compute GWA values. No Covariates provided. Only loco and maf vals given. diff --git a/tests/integration/test_gemma.py b/tests/integration/test_gemma.py index 73c7baa..d78eead 100644 --- a/tests/integration/test_gemma.py +++ b/tests/integration/test_gemma.py @@ -258,7 +258,7 @@ class GemmaAPITest(unittest.TestCase): def test_gwa_compute_with_loco_covars(self, mock_redis, mock_path_exist, mock_json, mock_hash, mock_queue_cmd): - """Test /gemma/gwa-compute//loco/covariates/maf/ + """Test /gemma/gwa-compute//loco/covars/maf/ """ mock_path_exist.return_value, _redis_conn = True, mock.MagicMock() @@ -273,7 +273,7 @@ class GemmaAPITest(unittest.TestCase): mock_hash.return_value = "hash" response = self.app.post(("/api/gemma/gwa-compute/" "hash-output.json/loco/" - "covariates/maf/21/my-token")) + "covars/maf/21/my-token")) mock_hash.assert_called_once_with([ '/tmp/my-token/genofile.txt', '/tmp/my-token/phenofile.txt', '/tmp/my-token/snpfile.txt', "/tmp/my-token/covarfile.txt" -- cgit v1.2.3