Skip to content

KANBAN-1057: Split gene counts into human gene counts and model organ… - #1676

Merged
Joe-Wdz merged 1 commit into
stagefrom
KANBAN-1057
Sep 24, 2026
Merged

Joe-Wdz merged 1 commit into
stagefrom
KANBAN-1057

Conversation

@Joe-Wdz

@Joe-Wdz Joe-Wdz commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Split gene counts into human gene counts and model organism gene counts

Test:
Human genes (Alzheimer's disease):
https://stage.alliancegenome.org/api/disease/DOID:10652/human_genes_counts

Model organism genes (Alzheimer's disease):
https://stage.alliancegenome.org/api/disease/DOID:10652/model_genes_counts

Total genes (Alzheimer's disease):
https://stage.alliancegenome.org/api/disease/DOID:10652/genes_counts.

@Joe-Wdz
Joe-Wdz requested a review from oblodgett September 24, 2026 16:37
@Joe-Wdz
Joe-Wdz requested a review from a team as a code owner September 24, 2026 16:37
@claude

claude Bot commented Sep 24, 2026

Copy link
Copy Markdown

Reviewed the changes: the two new endpoints (/{id}/human_genes_counts, /{id}/model_genes_counts) and countDistinctPositiveGenesBySpeciesGroup. I found no blocking issues.

  • The query is the same as the existing countDistinctPositiveSubjects (category filter, parentSlimIDs.keyword, excluding negated annotations, cardinality with an exact precision threshold). The only addition is a human-taxon filter or mustNot, so it runs as one size-0 aggregation query per call and doesn't add N+1 or extra load.
  • subject.taxon.curie.keyword isn't listed explicitly in Mapping.java, but the main search index relies on dynamic mapping (parentSlimIDs.keyword isn't listed either). The file generators already read *.taxon.curie from these docs, so the field should exist.
  • The changes only add endpoints and don't change any existing API.
  • Minor point, not blocking: the model count uses mustNot(human), so a gene annotation with no subject.taxon.curie counts as a model-organism gene. As a result, human + model always equals the existing genes_counts, which is probably what you want.

LGTM.

@Joe-Wdz
Joe-Wdz merged commit fbbd63b into stage Sep 24, 2026
5 checks passed
@Joe-Wdz
Joe-Wdz deleted the KANBAN-1057 branch September 24, 2026 16:45
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