diff options
| author | Pjotr <wrk@bosa.lan> | 2026-10-07 10:42:51 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-10-07 10:42:51 +0000 |
| commit | e912c87deaf220fd5fce1299d669e8fa992b5338 (patch) | |
| tree | 5a065b3178770291c8f9fda5c88e35d31d47243f /test/python/test_dataset_probeset_info.py | |
| parent | 89c881605a5c94be75f27c2c82cb04cf8bb3b9a8 (diff) | |
| download | genenetwork4-e912c87deaf220fd5fce1299d669e8fa992b5338.tar.gz | |
* src/routes/search.rs (search): add lod, locus, and sort/order.
Search hits gain `lod` (lrs / 4.61) and `locus` (the peak marker name, looked up in PublishXRef in one batched query; null when the database is unavailable). `sort=lrs|lod` with `order=asc|desc` ranks hits: gn3 is asked for its first 1000 matches, those are ranked, then `limit` applies. * src/db.rs (LRS_PER_LOD, lod, get_publish_loci): add the shared LRS-to-LOD constant and the locus lookup; TraitInfo and ProbeSetInfo gain `lod`, computed in SQL from the same constant. * tests/search.rs, test/python/test_search.py: add the "highest LOD, locus marker and additive effect for serotonin in BXD male midbrain" scenario over a recorded production fixture, plus sort/order tests. * tests/group_trait_info.rs, tests/dataset_probeset_info.rs and their Python mirrors: assert lod (and locus for trait 17985). * README.md (Endpoints): document sort, order, lod and locus. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'test/python/test_dataset_probeset_info.py')
| -rw-r--r-- | test/python/test_dataset_probeset_info.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/python/test_dataset_probeset_info.py b/test/python/test_dataset_probeset_info.py index c073f3a..04241ba 100644 --- a/test/python/test_dataset_probeset_info.py +++ b/test/python/test_dataset_probeset_info.py @@ -56,6 +56,7 @@ class DatasetProbesetInfoTest(ServerTestCase): self.assertEqual(info["name"], "100001_at") self.assertEqual(info["symbol"], "Cd3g") self.assertIsInstance(info["mean"], float) + self.assertAlmostEqual(info["lod"], info["lrs"] / 4.61) def test_dataset_probeset_info_without_a_token_returns_401(self): if not database_reachable(): |
