about summary refs log tree commit diff
path: root/sql
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-10-11 19:52:40 +0000
committerPjotr Prins <pjotr.public01@thebird.nl>2026-10-12 08:19:21 +0200
commitf54612182de31b667bc3f74268ab5695649dae36 (patch)
treeb035ac37a2af5a75b208f54773f2b2f9db2a6169 /sql
parentddd5d2d8d2830b6233acfebc9a5d84292cf19d6f (diff)
downloadgenenetwork3-f54612182de31b667bc3f74268ab5695649dae36.tar.gz
gemma: remove the broken /api/gemma endpoints and their unreachable code
gn3/computations/gemma.py's generate_gemma_cmd always appended "-gk"
to every composed command, including its gwa-compute/k-gwa-compute
endpoints that also set -lmm. Confirmed by actually running the
composed command against real gemma-wrapper/GEMMA: real GEMMA rejects
that combination outright ("only one of -gk ... -lmm ... options is
allowed"), so none of these endpoints could ever produce output.
tests/integration/test_gemma.py was entirely @unittest.skip, so this
was never caught.

Checked that GeneNetwork2 never called these endpoints over HTTP (no
reference to api/gemma, k-compute, gwa-compute or k-gwa-compute
anywhere in its codebase) -- it runs gemma-wrapper itself directly
(wqflask/marker_regression/gemma_mapping.py), via its own
GEMMA_WRAPPER_COMMAND and os.system() calls, never through GN3's API.
So these endpoints had no real caller on either side.

Removed:
- gn3/api/gemma.py and its blueprint registration in gn3/app.py.
- generate_gemma_cmd and generate_pheno_txt_file from
  gn3/computations/gemma.py (gn3/api/gemma.py was their only caller).
  generate_hash_of_string stays: GeneNetwork2 imports it directly
  (gemma_mapping.py, export_traits.py, views.py), and
  gn3/computations/rqtl.py uses it too.
- compose_gemma_cmd from gn3/commands.py (generate_gemma_cmd was its
  only caller), and the now-unused `List` import that went with it.
- tests/integration/test_gemma.py (tested only the removed blueprint).
- The generate_gemma_cmd/generate_pheno_txt_file tests from
  tests/unit/computations/test_gemma.py and the compose_gemma_cmd
  tests from tests/unit/test_commands.py; generate_hash_of_string's
  and compose_rqtl_cmd's own tests stay.
- CACHEDIR and GEMMA_WRAPPER_CMD from gn3/settings.json: both were
  read only by the removed gn3/api/gemma.py.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'sql')
0 files changed, 0 insertions, 0 deletions