Skip to content

Gene search: several genes and homologs (G3-832, G3-834); fixed identifier choice in gene values (G3-836) - #41

Merged
belkassaby merged 7 commits into
mainfrom
feat/G3-832-836-search-and-gene-values
Nov 17, 2026
Merged

belkassaby merged 7 commits into
mainfrom
feat/G3-832-836-search-and-gene-values

Conversation

@belkassaby

@belkassaby belkassaby commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Three of the five tickets get code here. G3-833 and G3-835 have no changes in this PR (reasons below).

G3-836: gene values pick a gene's identifier by a fixed rule

GET /genesets/{id}/values?gene_id_type=N picked one identifier per gene with DISTINCT ON and no ORDER BY, so the choice was arbitrary. It is now ordered:

  1. the identifier the uploader used (gsv_source_list, ignoring case), if it is of the requested type;
  2. otherwise the preferred one (ode_pref);
  3. otherwise the lowest ode_ref_id.

Symbols are the one exception: when gene symbols are requested, or a gene has no identifier of the requested type and falls back to its symbol, the official (preferred) symbol comes first, ahead of an alias the uploader typed, so the gene set page keeps showing official symbols (d52e70f). A gene with no preferred symbol still gets a row; before d52e70f a filter dropped 5 such genes on dev.

Cross-species mapping (map_geneset_homology) used to keep the last homolog returned. It now keeps the first, with homologs ordered preferred first, then by id. The rule is documented on the endpoint. No all_ids option was added; the ticket listed it as optional.

G3-832: several genes in one search

  • gene on GET /genesets/search is now a list. Repeat the parameter (gene=Drd2&gene=Tp53); one gene still works. At most 5. The API trims each gene, drops blanks and removes duplicates, ignoring case.
  • gene_match: all (default) or any.
  • Cutoffs apply to each gene's own score. threshold_mode=first orders by how many genes pass, so gene sets where all pass come first.
  • UI: the gene field reads Drd2, Tp53 / Drd2 AND Tp53 (spaces and semicolons too) as all, and Drd2 OR Th as any. Mixing AND with OR, or giving more than 5 genes, is refused with a message. The field is kept in the URL and shared with the analyze page's gene set picker.
  • UI: every filter (species, tier, score type, size, genes, homologs, each cutoff and both cutoff modes) has an info icon whose tooltip says what it does, on hover and on keyboard focus. The text is FILTER_HELP in search-filters.ts.

G3-834: homologs in gene search

  • homology is on by default in the API (the DB query builder's own default is off). Each gene is widened through extsrc.homology, so Drd2 also finds zebrafish gene sets holding drd2a and worm gene sets holding dop-3. homology=false searches the exact gene only. (TP53 is not an example: "Tp53" is an alternate name of mouse Trp53, so it matches directly.)
  • Which homology groups (30ec9b5). Not every group of every gene whose identifier matches, because identifiers collide across species. A group is used when the identifier names it in the most species: ranked by species where it is a gene's official symbol, then by species matching it at all, with ties all kept. The group of a mouse or human gene the identifier officially names is always used too. ABBA differs here: it seeds only from official symbols in the species the user picks.
  • Cutoffs apply to whichever gene matched, the searched gene or its homolog.
  • Each result of a gene search carries matched_genes (query, gene, homolog, value), and the results table shows e.g. Matched: Drd2, dop-3 (homolog of Drd2).
  • UI: an "Include homologs in other species" checkbox next to the gene field, kept in the URL as homology=off when cleared.

Fixed: homologs came from genes that only share the name

Before 30ec9b5, homologs came from every group of every matching gene, so another species' gene that only shares the name brought in an unrelated group. Measured on dev with this PR deployed, signed out:

Search Before After Homologs only (before → after)
Th 4,279 3,673 694 → 88: Txnrd2 (590) and worm trxr-2 (16) gone, through fly Trxr1's alias "TH"; worm cat-2 (88) kept
Comt 4,810 3,658 1,152 → 0: Nsf, nsfa, Nsf2 and nsf-1 gone, through fly comatose, officially "comt"
Drd2 4,504 4,504 148, unchanged
Trp53 9,197 9,197 unchanged

On dev, 4,610 of 23,869 mouse and human official symbols match genes in more than one homology group. 414 tie for the top rank and keep all their tied groups; they are mostly mouse and human genes that Homologene puts in separate groups. Without the mouse/human clause, 41 symbols would have lost their own gene's group. The count query takes the same time as before (about 0.3 s warm for Th, Tp53, Trp53 and Clcnkb).

Known, left as it is

  • Direct matching still takes any identifier of any species, including another gene's alias. So Th finds fly gene sets holding Trxr1 even with homologs off, labelled by the gene that matched (Trxr1). This predates the PR and is needed for alias and ID lookups (TP53 → mouse Trp53). Narrowing it would also drop real matches, such as zebrafish comta for comt.

Not in this PR

  • G3-835 (keyword search indexes only in-threshold genes): left for curation to choose between indexing every gene and indexing none. Either way it needs migration 122 and measurements on dev and sqa first.
  • G3-833 (cart / Project for analysis): depends on G3-790 (basket) and G3-796 (projects API), and neither exists yet.

Testing

  • pytest packages/db/tests/unit: 56,007 passed. pytest tests: 732 passed, 30 skipped, and 1 failed: test_namespace_integrity.py::test_first_party_subpackage_is_importable[client], which already failed at 56cb8f1, before 30ec9b5. Whether it also fails on main was not rechecked.
  • UI jest: 416 passed at 56cb8f1 (the info icons added 6). 30ec9b5 changes only comments in the UI. The production build reports the same initial-bundle budget error as unchanged main (1.72 MB); this change adds about 3 kB.
  • The new SQL was run against a scratch Postgres 16 with fixture rows:
    • homologs, all/any, cutoffs on each gene, first ordering, matched_genes;
    • the count equals the rows of the pages;
    • the gene from the ticket with three Ensembl IDs returns the uploaded one; one uploaded as a symbol returns the preferred Ensembl ID; one with no preferred ID returns the lowest.
  • The homology-group SQL of 30ec9b5 was run read-only against dev's data before pushing, for the counts in the table above.
  • Done on dev (see the 2026-11-11 comment): the identifier rule on GS404648, which shows the same case as GS412566, and latency of 0.5 to 1.2 s. Still open: GS412566 itself exists only on stage and prod, so it is to be checked there.

…ed one first (G3-836)

GET /genesets/{id}/values?gene_id_type=N returns one identifier of the requested type per
gene, chosen by DISTINCT ON with no ORDER BY, so whichever row Postgres met first won.
GS412566's gene uploaded as ENSMUSG00000089945 came back as ENSMUSG00000038729, which the
Strain Recommender's mESC reference does not hold, so it dropped the gene.

The choice is now ordered: the identifier the uploader used (gsv_source_list, ignoring
case), then the preferred one (ode_pref), then the lowest ode_ref_id. Across species,
map_geneset_homology kept the last homolog returned, in no defined order; the homologs now
come preferred first, then by id, and the first is kept. The rule is on the endpoint.
…r homologs (G3-832, G3-834)

`gene` on GET /genesets/search is now a list (repeat the parameter; one still works), at
most five, with `gene_match` all (the default) or any. The score cutoffs apply to each
gene's own score in the gene set; threshold_mode "first" orders by how many genes pass, so
gene sets where all pass lead.

`homology` (on by default) widens each gene through extsrc.homology, as ABBA does, so
TP53 finds mouse gene sets holding Trp53; false searches the exact gene only. The cutoffs
apply to whichever gene matched. Each result of a gene search carries `matched_genes`:
which of its genes matched each searched gene, whether it is a homolog, and its score.
… results say which gene matched (G3-832, G3-834)

The gene field reads genes as the text search reads words: spaces, commas or AND mean all,
OR in capitals means any; AND with OR, or more than five genes, is refused with a message.
A homolog checkbox (on by default) sits next to it, both kept in the URL and shared with
the analyze page's gene set picker. Each result names the gene it matched, e.g.
"Trp53 (homolog of TP53)".
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Test Coverage Report

============================= test session starts ==============================
platform linux -- Python 3.11.18, pytest-8.4.2, pluggy-1.6.0
rootdir: /home/runner/work/geneweaver/geneweaver
configfile: pyproject.toml
plugins: asyncio-1.3.0, anyio-4.13.0, cov-4.1.0
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 775 items

tests/controllers/test_api_standards.py ................................ [  4%]
........................................................................ [ 13%]
..............................................ssssssssssssssssssssssssss [ 22%]
ssss                                                                     [ 23%]
tests/controllers/test_genes.py .............                            [ 24%]
tests/controllers/test_genesets.py ..................................... [ 29%]
.....................                                                    [ 32%]
tests/controllers/test_genesets_search.py ......................         [ 35%]
tests/controllers/test_monitor.py .                                      [ 35%]
tests/controllers/test_publications.py ........                          [ 36%]
tests/controllers/test_return_schemas.py .                               [ 36%]
tests/controllers/test_search.py ..                                      [ 36%]
tests/controllers/test_sessions.py ..................................... [ 41%]
....                                                                     [ 42%]
tests/controllers/test_species.py ....                                   [ 42%]
tests/controllers/test_tools.py ........................................ [ 47%]
...............                                                          [ 49%]
tests/core/test_security.py ...........                                  [ 51%]
tests/core/test_session.py ........................                      [ 54%]
tests/services/io/test_read_file_contents.py ...............             [ 56%]
tests/services/test_abba.py ................................             [ 60%]
tests/services/test_asynctask.py ......................                  [ 63%]
tests/services/test_gene.py ..............                               [ 64%]
tests/services/test_genset.py .......................................... [ 70%]
..................................................                       [ 76%]
tests/services/test_monitors.py ..                                       [ 77%]
tests/services/test_ontology.py ....                                     [ 77%]
tests/services/test_publications.py .......                              [ 78%]
tests/services/test_similar_genesets.py .......                          [ 79%]
tests/services/test_species.py .......                                   [ 80%]
tests/services/test_tool_inputs.py .................                     [ 82%]
tests/services/test_tools.py ........................................... [ 88%]
........................................................................ [ 97%]
........                                                                 [ 98%]
tests/test_namespace_integrity.py .............                          [100%]

=============================== warnings summary ===============================
tests/data/__init__.py:10
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:10: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    geneset_response_json = importlib.resources.read_text("tests.data", "response_geneset_1234.json")

../../../../../opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/importlib/resources/_legacy.py:80: 11 warnings
  /opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/importlib/resources/_legacy.py:80: DeprecationWarning: open_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    with open_text(package, resource, encoding, errors) as fp:

tests/data/__init__.py:11
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:11: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    geneset_w_gene_id_type_json = importlib.resources.read_text(

tests/data/__init__.py:15
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:15: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    geneset_list_response_json = importlib.resources.read_text("tests.data", "geneset.json")

tests/data/__init__.py:17
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:17: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    gene_homologus_ids_json = importlib.resources.read_text("tests.data", "homologus_ids.json")

tests/data/__init__.py:19
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:19: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    gene_id_mapping_json = importlib.resources.read_text("tests.data", "gene_maping.json")

tests/data/__init__.py:21
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:21: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    publications_json = importlib.resources.read_text("tests.data", "publications.json")

tests/data/__init__.py:23
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:23: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    jwt_test_keys_json = importlib.resources.read_text("tests.data", "security_jwt_RS256_keys.json")

tests/data/__init__.py:25
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:25: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    species_json = importlib.resources.read_text("tests.data", "species.json")

tests/data/__init__.py:27
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:27: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    genes_json = importlib.resources.read_text("tests.data", "genes.json")

tests/data/__init__.py:29
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:29: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    monitors_json = importlib.resources.read_text("tests.data", "monitors.json")

tests/data/__init__.py:31
  /home/runner/work/geneweaver/geneweaver/tests/data/__init__.py:31: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    ontology_json = importlib.resources.read_text("tests.data", "ontology.json")

tests/controllers/test_sessions.py: 17 warnings
tests/core/test_session.py: 10 warnings
  /home/runner/work/geneweaver/geneweaver/.venv/lib/python3.11/site-packages/starlette/testclient.py:445: DeprecationWarning: Setting per-request cookies=<...> is being deprecated, because the expected behaviour on cookie persistence is ambiguous. Set cookies directly on the client instance instead.
    return super().request(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.11.18-final-0 ----------
Name                                              Stmts   Miss  Cover
---------------------------------------------------------------------
src/geneweaver/api/__init__.py                        5      2    60%
src/geneweaver/api/controller/__init__.py             0      0   100%
src/geneweaver/api/controller/api.py                 19      1    95%
src/geneweaver/api/controller/auth.py                95      1    99%
src/geneweaver/api/controller/genes.py               38      0   100%
src/geneweaver/api/controller/genesets.py           100      3    97%
src/geneweaver/api/controller/message.py             27      0   100%
src/geneweaver/api/controller/monitors.py            15      0   100%
src/geneweaver/api/controller/publications.py        34      0   100%
src/geneweaver/api/controller/search.py              20      0   100%
src/geneweaver/api/controller/species.py             16      0   100%
src/geneweaver/api/controller/tools.py               84      1    99%
src/geneweaver/api/controller/utilities.py            9      0   100%
src/geneweaver/api/core/__init__.py                   0      0   100%
src/geneweaver/api/core/config.py                     2      0   100%
src/geneweaver/api/core/config_class.py              44      0   100%
src/geneweaver/api/core/exceptions.py                13      1    92%
src/geneweaver/api/core/security.py                 139     20    86%
src/geneweaver/api/core/session.py                   37      1    97%
src/geneweaver/api/dependencies.py                   72     37    49%
src/geneweaver/api/main.py                            1      0   100%
src/geneweaver/api/schemas/__init__.py                0      0   100%
src/geneweaver/api/schemas/apimodels.py              62      6    90%
src/geneweaver/api/schemas/auth.py                   17      0   100%
src/geneweaver/api/schemas/messages.py               15     15     0%
src/geneweaver/api/schemas/score.py                  12     12     0%
src/geneweaver/api/schemas/search.py                 58      1    98%
src/geneweaver/api/schemas/tools.py                  60      1    98%
src/geneweaver/api/services/__init__.py               0      0   100%
src/geneweaver/api/services/abba.py                  77      1    99%
src/geneweaver/api/services/asynctask.py             90      1    99%
src/geneweaver/api/services/genes.py                 45      0   100%
src/geneweaver/api/services/geneset.py              186      5    97%
src/geneweaver/api/services/io.py                     4      0   100%
src/geneweaver/api/services/monitors.py              10      0   100%
src/geneweaver/api/services/parse/__init__.py         0      0   100%
src/geneweaver/api/services/publications.py          46      0   100%
src/geneweaver/api/services/pubmeds.py                0      0   100%
src/geneweaver/api/services/similar_genesets.py      47      0   100%
src/geneweaver/api/services/species.py               17      0   100%
src/geneweaver/api/services/tool_inputs.py           64      0   100%
src/geneweaver/api/services/tool_runner.py            8      0   100%
src/geneweaver/api/services/tools.py                277      2    99%
---------------------------------------------------------------------
TOTAL                                              1865    111    94%
Coverage HTML written to dir htmlcov

================ 745 passed, 30 skipped, 49 warnings in 16.60s =================

@belkassaby
belkassaby temporarily deployed to jax-cluster-dev-10--dev November 5, 2026 14:49 — with GitHub Actions Inactive
@belkassaby
belkassaby temporarily deployed to jax-cluster-dev-10--dev November 5, 2026 14:55 — with GitHub Actions Inactive
@belkassaby
belkassaby requested a deployment to jax-cluster-dev-10--sqa November 11, 2026 13:36 — with GitHub Actions Waiting
@belkassaby
belkassaby requested review from bergsalex and francastell and a lite review from Copilot and removed request for francastell November 11, 2026 14:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A moderate active issue means the documented priority rule still fails for gene-symbol requests because the symbol-only prefilter excludes non-preferred uploaded identifiers before ordering.

1 open issue
What changed in this PR

This PR extends gene-set search with multiple genes, configurable homolog matching, per-gene score filtering, and matched-gene annotations, while making gene identifier and homolog selection deterministic.

Changes:

  • Adds all/any multi-gene search with a five-gene limit, threshold ordering, URL support, and shared UI controls.
  • Enables homolog-aware searches by default and displays matched-gene metadata in results.
  • Adds deterministic identifier and homolog selection rules with backend and frontend test coverage.
File Description
ui/​src/​app/​search/​search-filters.ts Parses multi-gene expressions, serializes homology settings, and formats matched-gene descriptions.
ui/​src/​app/​search/​search-filters.spec.ts Tests multi-gene parsing, homology URL state, descriptions, and matched-gene formatting.
ui/​src/​app/​models/​gene-set.ts Adds the optional matched-gene result model.
ui/​src/​app/​components/​searchfilters/​search-filters.component.ts Adds multi-gene and homolog filter controls with contextual cutoff labels.
ui/​src/​app/​components/​genesetsearch/​geneset-search.component.ts Updates search help text for multi-gene and homolog searches.
ui/​src/​app/​components/​genesetsearch/​geneset-search.component.spec.ts Updates search help-text test coverage.
ui/​src/​app/​components/​genesetlist/​genesetlist.component.ts Exposes matched-gene formatting to the result template.
ui/​src/​app/​components/​genesetlist/​genesetlist.component.html Displays which genes matched each result.
tests/​services/​test_genset.py Tests deterministic first-homolog retention during mapping.
tests/​controllers/​test_genesets_search.py Tests multi-gene request parsing and matched-gene response propagation.
src/​geneweaver/​api/​services/​geneset.py Keeps the first ordered homolog for each gene during cross-species mapping.
src/​geneweaver/​api/​schemas/​search.py Defines multi-gene, homology, cutoff, and search validation fields.
src/​geneweaver/​api/​controller/​genesets.py Documents deterministic identifier and homolog selection behavior.
packages/​db/​tests/​unit/​query/​search/​test_genesets.py Tests generated SQL for multi-gene, threshold, homology, and matched-gene behavior.
packages/​db/​tests/​unit/​geneset_value/​test_by_geneset_id_and_identifier.py Tests deterministic identifier ordering and parameter binding.
packages/​db/​tests/​unit/​gene/​test_get_homolog_ids_by_ode_id.py Tests deterministic homolog ordering.
packages/​db/​src/​geneweaver/​db/​query/​search/​search.py Builds multi-gene, homolog-aware search SQL and matched-gene result columns.
packages/​db/​src/​geneweaver/​db/​geneset_value.py Adds deterministic identifier selection ordering.
packages/​db/​src/​geneweaver/​db/​gene.py Orders homolog identifiers by preference and reference ID.

Review effort: Lite

Comment on lines +243 to +248
ORDER BY g.ode_gene_id, g.gdb_id,
-- 1. the identifier the uploader used
EXISTS (
SELECT 1 FROM unnest(gsv.gsv_source_list) AS uploaded(id)
WHERE lower(uploaded.id) = lower(g.ode_ref_id)
) DESC,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in d52e70f, partly as suggested.

Removing the filter alone would make an alias in the upload replace the official symbol. The gene set page has always shown the official symbol, and changing that is a display decision that doesn't belong in G3-836. So the preferred-symbol rule stays, but it's now the first ORDER BY key inside the DISTINCT ON instead of a WHERE filter:

  • A gene with a preferred symbol shows it, as before.
  • A gene with no preferred symbol now gets the uploaded symbol, or else the lowest one.

The filter used to drop those genes entirely, both when symbols were requested and when symbols were the fallback type. On dev that's 5 genes, all in gene sets (GS135132, GS224150, GS403640, GS224970, GS223142).

I ran the old and new query side by side on dev data:

  • those 5 genes come back;
  • no other row changes, including AKAP2 in GS404648, GS227189 and GS405734.

Tests added for the symbol ordering and for "no ode_pref in the WHERE". The rule is documented in the docstring and on GET /genesets/{id}/values.

…set's values (G3-836)

by_geneset_id_and_identifier kept only preferred symbols with a WHERE
filter, so a gene whose symbols are all non-preferred lost its row
whenever symbols were requested, or were the fallback type. On dev that
is 5 genes, all in gene sets (GS135132, GS224150, GS403640, GS224970,
GS223142).

The preferred symbol is now the first ORDER BY key inside the DISTINCT
ON instead of a filter. Symbols still show the official symbol ahead of
an alias in the upload, as the gene set page always has; a gene with no
preferred symbol now falls through to the uploaded symbol, then the
lowest. Checked against dev with the old and new query side by side:
those 5 genes come back, and no other row changes.

Raised by Copilot's review on #41.
@belkassaby
belkassaby temporarily deployed to jax-cluster-dev-10--dev November 11, 2026 14:30 — with GitHub Actions Inactive
@belkassaby
belkassaby temporarily deployed to jax-cluster-dev-10--dev November 11, 2026 14:34 — with GitHub Actions Inactive
@belkassaby

belkassaby commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Review follow-up (2026-11-11)

The review (PASS on 457b8e00) left two real-data checks open. Both are done on dev, with this PR deployed (image 2c1493c = this PR merged onto main):

  • GS412566 identifier (G3-836). GS412566 isn't in the dev or sqa database; it only exists in stage/prod. I used the same case on dev: AKAP2 has three Ensembl IDs, and in GS404648 it was uploaded as ENSMUSG00000089945. GET /genesets/404648/values?gene_id_type=2 returns ENSMUSG00000089945. Genes uploaded under the other two IDs return those IDs, and a gene uploaded as a symbol gets the lowest one. Details are on G3-836. GS412566 itself still needs checking on stage.

  • Latency (G3-832, G3-834).

    • Single gene, exact match: 0.48 s.
    • Single gene with homologs: 0.84 s.
    • Five genes with AND/OR: 1.0–1.2 s, including with a p-value cutoff and threshold_mode=first.
    • A 6th gene is rejected with 422.

    Tables are on G3-832 and G3-834. One note: on dev, TP53 already finds mouse Trp53 with homologs off, because Trp53 has "Tp53" as an alias in the gene data.

Copilot's comment (symbol filter): fixed in d52e70f. See the reply on the thread.

  • The official symbol is now the first sort key instead of a WHERE filter.
  • That brings back 5 dev genes that had no preferred symbol and were silently dropped from their gene sets' values.
  • I compared the old and new query on dev data: no other row changes.

@belkassaby
belkassaby requested a deployment to jax-cluster-dev-10--sqa November 11, 2026 15:25 — with GitHub Actions Waiting
…3-832)

Each control in the gene set search filters (species, curation tier,
score type, size, genes, homologs, the score cutoffs and both ways of
using them) has an info icon. Its tooltip opens on hover and on keyboard
focus, and the icon's label gives screen readers the same text.

The text lives in FILTER_HELP beside the filters themselves. The tier
wording follows odestatic.curation_levels, and the cutoff wording follows
gene_threshold_filter: a cutoff applies only to its own score type, to
each searched gene, with AND every gene passing and with OR one.

The homology help no longer uses TP53 as its example: on dev "Tp53" is
an alternate name of mouse Trp53, so TP53 matches it directly and is
not a homolog match. Drd2 finding zebrafish drd2a is.
@belkassaby
belkassaby temporarily deployed to jax-cluster-dev-10--dev November 13, 2026 15:08 — with GitHub Actions Inactive
@belkassaby
belkassaby requested a deployment to jax-cluster-dev-10--sqa November 13, 2026 15:09 — with GitHub Actions Waiting
@belkassaby
belkassaby temporarily deployed to jax-cluster-dev-10--dev November 13, 2026 15:12 — with GitHub Actions Inactive
…every group sharing its name (G3-834)

Homologs came from every homology group of every gene whose identifier matched,
in any species, so another species' gene that only shares the name brought in
an unrelated group. On dev, Th matched fly Trxr1 by its alias "TH" and added
590 gene sets holding Txnrd2; Comt matched fly comatose, officially "comt", and
added 1,149 holding Nsf.

Now a group is used when it is the one the identifier names in the most
species: ranked by species with it as a gene's official symbol, then by species
matching it at all, ties all kept. The group of a mouse or human gene the
identifier officially names is always used too, so a typed mouse or human
symbol never loses its own gene's homologs. Direct matches are unchanged.

On dev (signed out): Th 4,279 -> 3,673 (only worm cat-2 added), Comt 4,810 ->
3,658, Drd2 4,504 unchanged; the count query runs in the same ~0.3 s.

The API's homology description and two UI comments gave TP53 -> Trp53 as a
homolog example, but Trp53 matches TP53 directly by alias; they now use Drd2 ->
dop-3.
Brings in PR 40. One conflict, in filterProblem (ui/src/app/search/search-filters.ts):
main added the p/q 0-to-1 range check and this branch returns the gene-parsing
error. Both are kept: the range check first, then parseGenes(filters.gene).error.
@belkassaby
belkassaby temporarily deployed to jax-cluster-dev-10--dev November 17, 2026 16:23 — with GitHub Actions Inactive
@belkassaby
belkassaby temporarily deployed to jax-cluster-dev-10--dev November 17, 2026 16:30 — with GitHub Actions Inactive
@belkassaby
belkassaby merged commit 36b3c3e into main Nov 17, 2026
13 checks passed
@belkassaby
belkassaby requested a deployment to jax-cluster-dev-10--sqa November 18, 2026 14:33 — with GitHub Actions Waiting

This branch is waiting to be deployed

1 inactive and 1 waiting deployments
jax-cluster-dev-10--sqa — 9d4816cd Waiting Nov 18, 2026 by belkassaby via UI Deploy: SQA / deploy #78
jax-cluster-dev-10--dev — 9d4816cd Deployed Nov 17, 2026 by belkassaby via Deploy: Dev / deploy #100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants