feat: gene page — search a gene, see its eQTLs across tissues#21
Merged
Conversation
Closes #5. Advances #4 (search) and #9 (name resolution). - repository.py: Gene + ensembl_number() (ENSG -> integer shard key) + resolve_gene() on the interface, fake, and real repos (queries gencode_v26_hg38); eQTL fan-out now reuses one DB connection. - web.py: create_app() takes a repository (DI); GET /search parses the query and routes gene symbols/Ensembl ids to GET /gene/{name}; the gene page joins tissue names and renders the eQTL table. - templates: search box on the landing page; gene.html; not_found.html. - Verified end-to-end against the live DB (read-only): "TP53" -> gene 141510 -> real GTEx eQTLs across tissues. beta direction is shown-without-interpretation per #18. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The first real user-facing feature (issue #5): search a gene symbol or Ensembl id and see its eQTLs across tissues.
resolve_gene()maps symbol/Ensembl →gencode_v26_hg38→ the integer shard key (ensembl_number:ENSG00000141510→141510).GET /search?q=parses the query (wiring insearch.py) and redirects gene queries toGET /gene/{name}.gene.html/not_found.html.Why
Turns the skeleton + data layer into a working portal slice. Built against the
QtlRepositoryinterface, so routes are tested with a fake and run on the real DB unchanged.How it was tested
ruff,ruff format,mypy --strict,pytestgreen; 100% coverage. Routes tested via an injected fake repo. Verified end-to-end against the live DB (read-only):resolve_gene('TP53')→ gene 141510 → real GTEx eQTLs across tissues.Notes / follow-ups
Checklist
Closes #5.