aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/gemma.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/gn3/api/gemma.py b/gn3/api/gemma.py
index d0cf5f8..c9c4e54 100644
--- a/gn3/api/gemma.py
+++ b/gn3/api/gemma.py
@@ -1,9 +1,11 @@
"""Endpoints for running the gemma cmd"""
from flask import Blueprint
+from flask import current_app
from flask import jsonify
gemma = Blueprint("gemma", __name__)
+from gn3.commands import run_cmd
@gemma.route("/")
def index() -> str:
@@ -13,8 +15,10 @@ def index() -> str:
@gemma.route("/version")
def get_version():
- pass
-
+ """Display the installed version of gemma-wrapper"""
+ gemma_cmd = current_app.config['APP_DEFAULTS'].get('GEMMA_WRAPPER_CMD')
+ return jsonify(
+ run_cmd(f"{gemma_cmd} -v | head -n 1"))
@gemma.route("/k-compute/<token>", methods=["POST"])
def run_k_compute(token) -> str:
@@ -31,6 +35,3 @@ def run_pheno_permutation(token) -> str:
pass
-@gemma.route("/lmm2/loco/<token>", methods=["POST"])
-def run_gemma_with_loco(token) -> str:
- pass