From 15a5c8abeb73584eeae6cae1d92176da42fa6bc3 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 5 Oct 2026 11:12:15 +0000 Subject: Add tests for denying a genuinely <1-year-old non-public dataset All four 403-deny tests so far used UTHSC_BXD_Cochlea_0225, which was a real non-public, non-embargoed dataset when first used as a fixture but is now ~20 months old -- still correctly denied (under the 5-year embargo threshold), but no longer actually tests "freshly added, private" data specifically, only "not yet old enough to auto-expire." Found UTHSC_BXD_2wk_Cochlea_0926 (public=1, confidentiality=1, created 2026-09-01, the most recently added ProbeSetFreeze in the database as of this writing) and added a parallel test alongside each existing UTHSC_BXD_Cochlea_0225 test -- dataset_probeset_info, its /values sibling, the dataset_probesets listing, and the unified /traits endpoint, in both Rust and Python -- confirming the deny path holds for data that's actually less than a year old, not just data that merely hasn't aged past 5 years yet. Verified live against the real database before adding (is_publicly_readable's two conditions -- flags and age -- both still correctly deny for this dataset; values/probeset data exists for it, so the test exercises the authorization check rather than a 404). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01XDDpXvZBQat9uSgDeEMJ8d --- test/python/test_dataset_probeset_info.py | 21 +++++++++++++++++++++ test/python/test_dataset_probeset_values.py | 21 +++++++++++++++++++++ test/python/test_dataset_probesets.py | 19 +++++++++++++++++++ test/python/test_traits.py | 19 +++++++++++++++++++ 4 files changed, 80 insertions(+) (limited to 'test/python') diff --git a/test/python/test_dataset_probeset_info.py b/test/python/test_dataset_probeset_info.py index 32d25a6..c073f3a 100644 --- a/test/python/test_dataset_probeset_info.py +++ b/test/python/test_dataset_probeset_info.py @@ -105,6 +105,27 @@ class DatasetProbesetInfoTest(ServerTestCase): error = json.loads(body) self.assertEqual(error["code"], "forbidden") + def test_dataset_probeset_info_recent_non_public_dataset_returns_403(self): + """Same as above, but with a dataset genuinely less than a year + old (UTHSC_BXD_Cochlea_0225 above is real but was already ~20 + months old by the time this test was written) -- the age-embargo + rule and the "not yet linked to any gn-auth resource" deny path + both need to hold for freshly-added data, not just for something + that merely hasn't aged into public yet. + UTHSC_BXD_2wk_Cochlea_0926 (public=1, confidentiality=1, created + 2026-09-01) is the most recently added ProbeSetFreeze in the + database as of this writing. + """ + self.require_fixtures() + + response, body = self.get( + "/datasets/UTHSC_BXD_2wk_Cochlea_0926/probesets/ENSMUSG00000028180" + ) + self.assertEqual(response.status, 403) + + error = json.loads(body) + self.assertEqual(error["code"], "forbidden") + if __name__ == "__main__": unittest.main() diff --git a/test/python/test_dataset_probeset_values.py b/test/python/test_dataset_probeset_values.py index 7a934d0..b11b5d6 100644 --- a/test/python/test_dataset_probeset_values.py +++ b/test/python/test_dataset_probeset_values.py @@ -109,6 +109,27 @@ class DatasetProbesetValuesTest(ServerTestCase): error = json.loads(body) self.assertEqual(error["code"], "forbidden") + def test_dataset_probeset_values_recent_non_public_dataset_returns_403(self): + """Same as above, but with a dataset genuinely less than a year + old (UTHSC_BXD_Cochlea_0225 above is real but was already ~20 + months old by the time this test was written) -- the age-embargo + rule and the "not yet linked to any gn-auth resource" deny path + both need to hold for freshly-added data, not just for something + that merely hasn't aged into public yet. + UTHSC_BXD_2wk_Cochlea_0926 (public=1, confidentiality=1, created + 2026-09-01) is the most recently added ProbeSetFreeze in the + database as of this writing. + """ + self.require_fixtures() + + response, body = self.get( + "/datasets/UTHSC_BXD_2wk_Cochlea_0926/probesets/ENSMUSG00000028180/values" + ) + self.assertEqual(response.status, 403) + + error = json.loads(body) + self.assertEqual(error["code"], "forbidden") + if __name__ == "__main__": unittest.main() diff --git a/test/python/test_dataset_probesets.py b/test/python/test_dataset_probesets.py index dcfcd99..c12b42a 100644 --- a/test/python/test_dataset_probesets.py +++ b/test/python/test_dataset_probesets.py @@ -89,6 +89,25 @@ class DatasetProbesetsTest(ServerTestCase): error = json.loads(body) self.assertEqual(error["code"], "forbidden") + def test_dataset_probesets_recent_non_public_dataset_returns_403(self): + """Same as above, but with a dataset genuinely less than a year + old (UTHSC_BXD_Cochlea_0225 above is real but was already ~20 + months old by the time this test was written) -- the age-embargo + rule and the "not yet linked to any gn-auth resource" deny path + both need to hold for freshly-added data, not just for something + that merely hasn't aged into public yet. + UTHSC_BXD_2wk_Cochlea_0926 (public=1, confidentiality=1, created + 2026-09-01) is the most recently added ProbeSetFreeze in the + database as of this writing. + """ + self.require_fixtures() + + response, body = self.get("/datasets/UTHSC_BXD_2wk_Cochlea_0926/probesets") + self.assertEqual(response.status, 403) + + error = json.loads(body) + self.assertEqual(error["code"], "forbidden") + if __name__ == "__main__": unittest.main() diff --git a/test/python/test_traits.py b/test/python/test_traits.py index 38bf411..6a44bd8 100644 --- a/test/python/test_traits.py +++ b/test/python/test_traits.py @@ -176,6 +176,25 @@ class TraitsTest(ServerTestCase): error = json.loads(body) self.assertEqual(error["code"], "forbidden") + def test_trait_info_recent_non_public_probeset_dataset_returns_403(self): + """Same as above, but with a dataset genuinely less than a year + old (UTHSC_BXD_Cochlea_0225 above is real but was already ~20 + months old by the time this test was written) -- the age-embargo + rule and the "not yet linked to any gn-auth resource" deny path + both need to hold for freshly-added data, not just for something + that merely hasn't aged into public yet. + UTHSC_BXD_2wk_Cochlea_0926 (public=1, confidentiality=1, created + 2026-09-01) is the most recently added ProbeSetFreeze in the + database as of this writing. + """ + self.require_fixtures() + + response, body = self.get("/traits/UTHSC_BXD_2wk_Cochlea_0926/ENSMUSG00000028180") + self.assertEqual(response.status, 403) + + error = json.loads(body) + self.assertEqual(error["code"], "forbidden") + if __name__ == "__main__": unittest.main() -- cgit 1.4.1 From 7631cf515ffe1a81424aa53ab7052a61a3ff2b4d Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 5 Oct 2026 15:25:22 +0000 Subject: Add GET /groups/{group}/case-attributes Per-strain metadata beyond genotype/phenotype data (age, sex, treatment, etc.), backed by MariaDB CaseAttribute/CaseAttributeXRefNew. Combines GeneNetwork3's separate /case-attribute/{id}/names and /case-attribute/{id}/values (gn3.api.case_attributes) into one response -- neither list is large enough on its own to need splitting. This is the only one of GeneNetwork2/3/gn-guile with the concept at all: GeneNetwork2 delegates to GeneNetwork3 rather than storing case attributes itself, and gn-guile doesn't have it. db::get_group_case_attributes returns {names: [...], values: [{strain, case_attributes: {...}}]}; values is built by folding adjacent (strain, attribute, value) rows (ordered by strain name) rather than grouping afterwards, since SQL already guarantees the adjacency. Found and fixed a real bug while verifying this live: GeneNetwork3's own query joins CaseAttribute to CaseAttributeXRefNew on CaseAttributeId alone, but CaseAttributeId is not unique across groups -- it's a shared vocabulary (id 37 means "Epoch" for dozens of unrelated groups simultaneously); the actual key is (InbredSetId, CaseAttributeId). Confirmed against this database: without also joining on InbredSetId, BXD's result included a spurious "Strain": "Live" attribute belonging to a different, unrelated group. Fixed on genenetwork4's side by adding the missing join condition. A group with no case attributes defined returns 200 with both lists empty, not a 404 (the group itself exists) -- verified against LXS, a real group with zero CaseAttribute rows. tests/group_case_attributes.rs and its Python mirror cover BXD's 4 real attributes (asserting each strain has exactly those 4, not more, to catch the join bug above), the empty-group case, missing token, and unknown group. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01XDDpXvZBQat9uSgDeEMJ8d --- README.md | 25 ++++++ RELEASE_NOTES.md | 16 ++++ src/db.rs | 98 ++++++++++++++++++++ src/lib.rs | 1 + src/routes/groups.rs | 56 ++++++++++++ test/python/test_group_case_attributes.py | 105 ++++++++++++++++++++++ tests/group_case_attributes.rs | 145 ++++++++++++++++++++++++++++++ 7 files changed, 446 insertions(+) create mode 100644 test/python/test_group_case_attributes.py create mode 100644 tests/group_case_attributes.rs (limited to 'test/python') diff --git a/README.md b/README.md index d64f771..64b0371 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ A Rust/Axum-based API server for GeneNetwork. | GET | `/groups` | All groups (InbredSet rows). | | GET | `/groups/{group}` | One group, by name or numeric Id. | | GET | `/groups/{group}/strains` | Strains/samples in a group. | +| GET | `/groups/{group}/case-attributes` | Case-attribute names and per-strain values. | | GET | `/groups/{group}/traits` | Published (phenotype) traits in a group. | | GET | `/groups/{group}/traits/{trait_id}` | A published (phenotype) trait's metadata. | | GET | `/groups/{group}/traits/{trait_id}/values` | A published trait's per-strain values. | @@ -165,6 +166,30 @@ Details, including example responses, below. parent strains (`B6D2F1`, `C57BL/6J`, `DBA/2J`), which aren't used for mapping. Needs `SQL_URI`, same as `/species` above. +- `GET /groups/{group}/case-attributes` - returns a group's case + attributes: extra per-strain metadata beyond genotype/phenotype data + (e.g. age, sex, treatment) -- every attribute name defined for the + group, and every strain's values for them, combined into one response + (GeneNetwork3's `gn3.api.case_attributes` splits this into separate + `.../names` and `.../values` endpoints; neither list is large enough + on its own to need splitting). This is the only one of the three + sibling GeneNetwork codebases that has case attributes at all -- + GeneNetwork2 delegates to GeneNetwork3 for them rather than storing + them itself, and gn-guile doesn't have the concept. 404 if no group + matches; a group with no case attributes defined returns `200` with + both lists empty, not a 404. Needs `SQL_URI`, same as `/species` + above. + + ```json + { + "names": ["Epoch", "RRID", "SeqCvge", "Status"], + "values": [ + {"strain": "BXD1", "case_attributes": {"Epoch": "1", "RRID": "JAX:000036", "SeqCvge": "36+39L", "Status": "Live"}}, + ... + ] + } + ``` + - `GET /groups/{group}/traits` - returns every published (phenotype) trait belonging to a group, the listing equivalent of `/groups/{group}/traits/{trait_id}` (same fields, same join, no diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d4258bd..9a84c06 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -104,6 +104,22 @@ endpoint also checks is a separate, per-endpoint matter -- see runs with zero manually-provisioned tokens, given `GENENETWORK4_DEV_MODE=true GENENETWORK4_BIND=127.0.0.1` for the test run (and a reachable gn-auth with `AUTHLIB_INSECURE_TRANSPORT` set). +- `GET /groups/{group}/case-attributes`: a group's case attributes -- + extra per-strain metadata beyond genotype/phenotype data -- combining + GeneNetwork3's separate `.../names` and `.../values` endpoints + (`gn3.api.case_attributes`) into one response. The only one of + GeneNetwork2/3/gn-guile that has this concept at all is GeneNetwork3 + (GeneNetwork2 delegates to it rather than storing case attributes + itself; gn-guile doesn't have the concept). Found and fixed a bug + along the way: GeneNetwork3's own query joins `CaseAttribute` to + `CaseAttributeXRefNew` on `CaseAttributeId` alone, but + `CaseAttributeId` is not unique across groups (it's a shared + vocabulary -- e.g. id 37 means "Epoch" for dozens of unrelated groups + at once; the real key is `(InbredSetId, CaseAttributeId)`) -- + confirmed live against this database: without also joining on + `InbredSetId`, BXD's result included a spurious `"Strain": "Live"` + attribute belonging to an unrelated group. `db::get_group_case_attribute_values` + adds the missing join condition. ### Not yet done diff --git a/src/db.rs b/src/db.rs index afc8f82..10bef16 100644 --- a/src/db.rs +++ b/src/db.rs @@ -466,6 +466,104 @@ pub fn get_group_datasets(group_id: u16) -> Result, mysql::Error> { ) } +/// One strain's case-attribute values within a group: extra per-strain +/// metadata (e.g. age, sex, treatment) beyond genotype/phenotype data, +/// matching GeneNetwork3's gn3.api.case_attributes (genenetwork4's own +/// read-only equivalent of its /case-attribute/{id}/values -- the only +/// place this concept exists; neither GeneNetwork2 nor gn-guile expose +/// it). Keyed by attribute name rather than a fixed field set, since +/// which attributes exist is itself per-group data (see CaseAttribute +/// below). +#[derive(Serialize, utoipa::ToSchema)] +pub struct StrainCaseAttributes { + pub strain: String, + pub case_attributes: std::collections::HashMap, +} + +/// A group's case attributes: every attribute name defined for it +/// (`CaseAttribute.Name`) and, for each strain that has at least one +/// value set, that strain's values -- combined into one response +/// rather than GN3's separate .../names and .../values endpoints, +/// since neither list is large enough on its own to need splitting. +#[derive(Serialize, utoipa::ToSchema)] +pub struct CaseAttributes { + pub names: Vec, + pub values: Vec, +} + +/// Fetch every case-attribute name defined for a group, matching +/// GeneNetwork3's gn3.api.case_attributes.__case_attribute_labels_by_inbred_set__ +/// (trimmed to just the name -- Description isn't used by genenetwork4 +/// yet, and CaseAttributeId/InbredSetId are already implied by this +/// being scoped to one group). +fn get_group_case_attribute_names(group_id: u16) -> Result, mysql::Error> { + let pool = pool()?; + let mut conn = pool.get_conn()?; + conn.exec( + "SELECT Name FROM CaseAttribute WHERE InbredSetId = :group_id ORDER BY Name", + mysql::params! { "group_id" => group_id }, + ) +} + +/// Fetch every strain's case-attribute values for a group, based on +/// GeneNetwork3's gn3.api.case_attributes.__case_attribute_values_by_inbred_set__, +/// fixed to also join on InbredSetId: `CaseAttributeId` alone is not +/// unique across groups (it's a shared vocabulary -- e.g. id 37 means +/// "Epoch" for dozens of unrelated groups at once; the table's real +/// key is the pair `(InbredSetId, CaseAttributeId)`), so GN3's version +/// of this join -- `ON ca.CaseAttributeId=caxrn.CaseAttributeId`, +/// `WHERE caxrn.InbredSetId=...` with no matching condition on `ca`'s +/// own InbredSetId -- pulls in every other group's attribute that +/// happens to share a `CaseAttributeId` number, not just this group's. +/// Confirmed against this database: without the extra join condition +/// below, BXD's (group 1) result included a spurious "Strain" = "Live" +/// attribute that belongs to a different, unrelated group entirely. +/// Rows come back one (strain, attribute, value) triple at a time, +/// ordered by strain name, so adjacent rows for the same strain are +/// folded into one `StrainCaseAttributes` as they're read rather than +/// grouped afterwards. +fn get_group_case_attribute_values(group_id: u16) -> Result, mysql::Error> { + let pool = pool()?; + let mut conn = pool.get_conn()?; + let rows: Vec<(String, String, String)> = conn.exec( + "SELECT s.Name, ca.Name, caxrn.Value \ + FROM CaseAttribute AS ca \ + JOIN CaseAttributeXRefNew AS caxrn \ + ON ca.CaseAttributeId = caxrn.CaseAttributeId \ + AND ca.InbredSetId = caxrn.InbredSetId \ + JOIN Strain AS s ON caxrn.StrainId = s.Id \ + WHERE caxrn.InbredSetId = :group_id \ + ORDER BY s.Name", + mysql::params! { "group_id" => group_id }, + )?; + let mut values: Vec = Vec::new(); + for (strain, attribute_name, attribute_value) in rows { + match values.last_mut() { + Some(last) if last.strain == strain => { + last.case_attributes.insert(attribute_name, attribute_value); + } + _ => { + let mut case_attributes = std::collections::HashMap::new(); + case_attributes.insert(attribute_name, attribute_value); + values.push(StrainCaseAttributes { + strain, + case_attributes, + }); + } + } + } + Ok(values) +} + +/// Fetch a group's case attributes: every attribute name defined for +/// it, and every strain's values for them. See `CaseAttributes`. +pub fn get_group_case_attributes(group_id: u16) -> Result { + Ok(CaseAttributes { + names: get_group_case_attribute_names(group_id)?, + values: get_group_case_attribute_values(group_id)?, + }) +} + /// Fetch the expression datasets belonging to a species (across all of /// its groups), the species-scoped equivalent of get_group_datasets. /// GeneNetwork2's own species-scoped variant of diff --git a/src/lib.rs b/src/lib.rs index f524429..46c4211 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,6 +63,7 @@ pub fn app() -> Router { .routes(routes!(routes::groups::group_trait_info)) .routes(routes!(routes::groups::group_traits)) .routes(routes!(routes::groups::group_datasets)) + .routes(routes!(routes::groups::group_case_attributes)) .routes(routes!(routes::datasets::dataset_by_name)) .routes(routes!(routes::datasets::dataset_probesets)) .routes(routes!(routes::datasets::dataset_probeset_info)) diff --git a/src/routes/groups.rs b/src/routes/groups.rs index 51f12cc..12652ec 100644 --- a/src/routes/groups.rs +++ b/src/routes/groups.rs @@ -376,6 +376,62 @@ pub async fn group_traits( }) } +#[utoipa::path(get, path = "/groups/{group}/case-attributes", summary = "Get a group's case attributes: defined attribute names and every strain's values", params( + ("group" = String, Path, description = "Group InbredSetName, Name, FullName or numeric Id") +), responses( + (status = 200, description = "The group's case-attribute names and per-strain values", body = db::CaseAttributes), + Unauthorized, + (status = 404, description = "No matching group", body = ApiError), + (status = 500, description = "Database error", body = ApiError) +))] +pub async fn group_case_attributes( + Extension(request_id): Extension, + Path(group): Path, + _token: AuthToken, +) -> Result, ApiError> { + let rid = request_id_string(&request_id); + let not_found_name = group.clone(); + tokio::task::spawn_blocking(move || { + db::get_group_by_name(&group).and_then(|group| match group { + Some(group) => db::get_group_case_attributes(group.id).map(Some), + None => Ok(None), + }) + }) + .await + .map_err(|e| { + ApiError::new( + StatusCode::INTERNAL_SERVER_ERROR, + "internal_error", + "Internal error", + e.to_string(), + "group_case_attributes", + ) + .with_request_id(rid.clone()) + })? + .map_err(|e| { + ApiError::new( + StatusCode::INTERNAL_SERVER_ERROR, + "database_error", + "Database error", + e.to_string(), + "group_case_attributes", + ) + .with_request_id(rid.clone()) + })? + .map(Json) + .ok_or_else(|| { + ApiError::new( + StatusCode::NOT_FOUND, + "group_not_found", + "Group not found", + format!("No group matching '{not_found_name}'."), + "group_case_attributes", + ) + .with_request_id(rid) + .with_next("/groups") + }) +} + #[utoipa::path(get, path = "/groups/{group}/datasets", summary = "List the expression (ProbeSet) datasets belonging to a group", params( ("group" = String, Path, description = "Group InbredSetName, Name, FullName or numeric Id") ), responses( diff --git a/test/python/test_group_case_attributes.py b/test/python/test_group_case_attributes.py new file mode 100644 index 0000000..71c933f --- /dev/null +++ b/test/python/test_group_case_attributes.py @@ -0,0 +1,105 @@ +"""Mirrors tests/group_case_attributes.rs. Needs a live MariaDB +(SQL_URI, see src/db.rs) and a valid token (every endpoint needs one +now -- see docs/gn-auth.md); skips rather than fails when either is +missing, same as test_group_by_name.py. +""" + +import http.client +import json +import socket +import unittest + +from auth_helpers import TOKEN_ENV, auth_token +from server_test_case import HOST, PORT, ServerTestCase + + +def database_reachable(): + try: + with socket.create_connection(("127.0.0.1", 3306), timeout=0.5): + return True + except OSError: + return False + + +class GroupCaseAttributesTest(ServerTestCase): + EXTRA_ENV = TOKEN_ENV + + def get(self, path): + token = auth_token() + if not token: + self.skipTest("no token (see docs/gn-auth.md)") + conn = http.client.HTTPConnection(HOST, int(PORT), timeout=10) + try: + conn.request("GET", path, headers={"Authorization": f"Bearer {token}"}) + response = conn.getresponse() + return response, response.read() + finally: + conn.close() + + def test_group_case_attributes_bxd_returns_names_and_values(self): + """BXD (InbredSetId 1) has exactly 4 case attributes -- Epoch, + RRID, SeqCvge, Status -- each strain in the response should have + exactly those 4 keys, not more (CaseAttributeId isn't unique + across groups -- see the comment in src/db.rs -- so getting the + join wrong would pull in unrelated groups' attributes too). + """ + if not database_reachable(): + self.skipTest("no database on 127.0.0.1:3306") + + response, body = self.get("/groups/BXD/case-attributes") + self.assertEqual(response.status, 200) + + case_attributes = json.loads(body) + self.assertEqual( + case_attributes["names"], ["Epoch", "RRID", "SeqCvge", "Status"] + ) + + values = case_attributes["values"] + self.assertTrue(values) + bxd1 = next(v for v in values if v["strain"] == "BXD1") + self.assertEqual( + set(bxd1["case_attributes"].keys()), set(case_attributes["names"]) + ) + + def test_group_case_attributes_group_with_none_returns_empty(self): + """LXS (InbredSetId 9) is a real group with no case attributes + defined at all -- an empty result, not a 404 (the group itself + exists).""" + if not database_reachable(): + self.skipTest("no database on 127.0.0.1:3306") + + response, body = self.get("/groups/LXS/case-attributes") + self.assertEqual(response.status, 200) + + case_attributes = json.loads(body) + self.assertEqual(case_attributes["names"], []) + self.assertEqual(case_attributes["values"], []) + + def test_group_case_attributes_without_a_token_returns_401(self): + if not database_reachable(): + self.skipTest("no database on 127.0.0.1:3306") + + conn = http.client.HTTPConnection(HOST, int(PORT), timeout=10) + try: + conn.request("GET", "/groups/BXD/case-attributes") + response = conn.getresponse() + finally: + conn.close() + self.assertEqual(response.status, 401) + + def test_group_case_attributes_unknown_group_returns_404(self): + if not database_reachable(): + self.skipTest("no database on 127.0.0.1:3306") + + response, body = self.get("/groups/not-a-real-group/case-attributes") + self.assertEqual(response.status, 404) + + error = json.loads(body) + self.assertEqual(error["status"], 404) + self.assertEqual(error["code"], "group_not_found") + self.assertEqual(error["operation_id"], "group_case_attributes") + self.assertEqual(error["next"], "/groups") + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/group_case_attributes.rs b/tests/group_case_attributes.rs new file mode 100644 index 0000000..245cf5b --- /dev/null +++ b/tests/group_case_attributes.rs @@ -0,0 +1,145 @@ +use axum::http::StatusCode; +use http_body_util::BodyExt; +use serde_json::Value; + +mod common; + +/// Needs a live MariaDB connection (SQL_URI, see src/db.rs) and a valid +/// token (every endpoint needs one now -- see docs/gn-auth.md); skips +/// rather than fails when either is missing, same as group_by_name.rs. +/// BXD (InbredSetId 1) has exactly 4 case attributes -- Epoch, RRID, +/// SeqCvge, Status -- each strain in the response should have exactly +/// those 4 keys, not more: db::get_group_case_attribute_values joins +/// CaseAttribute to CaseAttributeXRefNew on CaseAttributeId alone would +/// be wrong here, since CaseAttributeId isn't unique across groups (see +/// the comment in src/db.rs) -- getting that join wrong would pull in +/// unrelated groups' attributes too. +#[tokio::test] +async fn group_case_attributes_bxd_returns_names_and_values() { + if !common::db_available() { + eprintln!( + "skipping group_case_attributes_bxd_returns_names_and_values: no usable database (check SQL_URI credentials)" + ); + return; + } + let Some(token) = common::auth_token().await else { + eprintln!( + "skipping group_case_attributes_bxd_returns_names_and_values: no token (see docs/gn-auth.md)" + ); + return; + }; + + let response = common::get_with_token( + "GET /groups/BXD/case-attributes", + "/groups/BXD/case-attributes", + &token, + ) + .await; + + assert_eq!(response.status(), StatusCode::OK); + + let body = response.into_body().collect().await.unwrap().to_bytes(); + let case_attributes: Value = serde_json::from_slice(&body).unwrap(); + + let names: Vec<&str> = case_attributes["names"] + .as_array() + .unwrap() + .iter() + .map(|n| n.as_str().unwrap()) + .collect(); + assert_eq!(names, vec!["Epoch", "RRID", "SeqCvge", "Status"]); + + let values = case_attributes["values"].as_array().unwrap(); + assert!(!values.is_empty()); + let bxd1 = values + .iter() + .find(|v| v["strain"] == "BXD1") + .expect("BXD1 in /groups/BXD/case-attributes"); + let attrs = bxd1["case_attributes"].as_object().unwrap(); + assert_eq!(attrs.len(), 4, "BXD1 should have exactly BXD's 4 case attributes, not more"); + for name in &names { + assert!(attrs.contains_key(*name)); + } +} + +/// LXS (InbredSetId 9) is a real group with no case attributes defined +/// at all -- an empty result, not a 404 (the group itself exists). +#[tokio::test] +async fn group_case_attributes_group_with_none_returns_empty() { + if !common::db_available() { + eprintln!( + "skipping group_case_attributes_group_with_none_returns_empty: no usable database (check SQL_URI credentials)" + ); + return; + } + let Some(token) = common::auth_token().await else { + eprintln!( + "skipping group_case_attributes_group_with_none_returns_empty: no token (see docs/gn-auth.md)" + ); + return; + }; + + let response = common::get_with_token( + "GET /groups/LXS/case-attributes", + "/groups/LXS/case-attributes", + &token, + ) + .await; + + assert_eq!(response.status(), StatusCode::OK); + + let body = response.into_body().collect().await.unwrap().to_bytes(); + let case_attributes: Value = serde_json::from_slice(&body).unwrap(); + assert_eq!(case_attributes["names"].as_array().unwrap().len(), 0); + assert_eq!(case_attributes["values"].as_array().unwrap().len(), 0); +} + +#[tokio::test] +async fn group_case_attributes_without_a_token_returns_401() { + if !common::db_available() { + eprintln!( + "skipping group_case_attributes_without_a_token_returns_401: no usable database (check SQL_URI credentials)" + ); + return; + } + + let response = common::get( + "GET /groups/BXD/case-attributes (no token)", + "/groups/BXD/case-attributes", + ) + .await; + + assert_eq!(response.status(), StatusCode::UNAUTHORIZED); +} + +#[tokio::test] +async fn group_case_attributes_unknown_group_returns_404() { + if !common::db_available() { + eprintln!( + "skipping group_case_attributes_unknown_group_returns_404: no usable database (check SQL_URI credentials)" + ); + return; + } + let Some(token) = common::auth_token().await else { + eprintln!( + "skipping group_case_attributes_unknown_group_returns_404: no token (see docs/gn-auth.md)" + ); + return; + }; + + let response = common::get_with_token( + "GET /groups/not-a-real-group/case-attributes", + "/groups/not-a-real-group/case-attributes", + &token, + ) + .await; + + assert_eq!(response.status(), StatusCode::NOT_FOUND); + let body = response.into_body().collect().await.unwrap().to_bytes(); + let error: Value = serde_json::from_slice(&body).unwrap(); + + assert_eq!(error["status"], 404); + assert_eq!(error["code"], "group_not_found"); + assert_eq!(error["operation_id"], "group_case_attributes"); + assert_eq!(error["next"], "/groups"); +} -- cgit 1.4.1 From 89c881605a5c94be75f27c2c82cb04cf8bb3b9a8 Mon Sep 17 00:00:00 2001 From: Pjotr Date: Wed, 7 Oct 2026 08:17:33 +0000 Subject: * test/python/server_test_case.py (_read_scramble): skip the packet header. _read_packet returns the 4-byte header plus body, but _read_scramble parsed from offset 1 as if the header were absent. It matched a zero byte in the header instead of the one ending the server version string, so the scramble was garbage, the mysql_native_password login was always denied, and database_reachable() returned False on every server, skipping the DB-gated tests. Start at offset 5. Co-Authored-By: Claude Sonnet 5.5 --- test/python/server_test_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/python') diff --git a/test/python/server_test_case.py b/test/python/server_test_case.py index d4bb330..be2dcf9 100644 --- a/test/python/server_test_case.py +++ b/test/python/server_test_case.py @@ -73,7 +73,7 @@ def _read_exact(sock, count): def _read_scramble(handshake): """Extract the 20-byte auth plugin data from the server handshake.""" - pos = 1 # protocol version + pos = 5 # 4-byte packet header, then protocol version pos = handshake.index(b"\0", pos) + 1 # server version string pos += 4 # connection id scramble = handshake[pos : pos + 8] -- cgit 1.4.1 From e912c87deaf220fd5fce1299d669e8fa992b5338 Mon Sep 17 00:00:00 2001 From: Pjotr Date: Wed, 7 Oct 2026 10:42:51 +0000 Subject: * 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 --- README.md | 20 +- src/db.rs | 91 +- src/routes/search.rs | 116 +- test/data/search_serotonin_midbrain_bxd.json | 2998 ++++++++++++++++++++++++++ test/python/test_dataset_probeset_info.py | 1 + test/python/test_group_trait_info.py | 15 + test/python/test_search.py | 93 +- tests/dataset_probeset_info.rs | 2 + tests/group_trait_info.rs | 35 + tests/search.rs | 106 + 10 files changed, 3458 insertions(+), 19 deletions(-) create mode 100644 test/data/search_serotonin_midbrain_bxd.json (limited to 'test/python') diff --git a/README.md b/README.md index 64b0371..11e3919 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ Details, including example responses, below. ```json { "id": 10001, "phenotype_id": 4, "publication_id": 116, - "mean": 52.135, "locus": "rs48756159", "lrs": 13.497, + "mean": 52.135, "locus": "rs48756159", "lrs": 13.497, "lod": 2.928, "additive": 2.394, "nsamples": 34, "pre_publication_description": "Central nervous system, morphology: Cerebellum weight, whole, bilateral in adults of both sexes [mg]", "post_publication_description": "Central nervous system, morphology: Cerebellum weight, whole, bilateral in adults of both sexes [mg]", @@ -311,7 +311,7 @@ Details, including example responses, below. {"probeset_id": 1, "name": "100001_at", "symbol": "Cd3g", "description": "...", "chr": "9", "mb": 44.96, "mean": 5.487942857142857, "locus": "rs13480619", - "lrs": 12.590069931048, "p_value": 0.269, + "lrs": 12.590069931048, "lod": 2.731, "p_value": 0.269, "additive": -0.28515625} ``` @@ -412,7 +412,21 @@ accepts: the `PublishFreeze`'s own `Name`/`ShortName`/`Id` (e.g. ] ``` - `GET /search` - free-text search across GN traits; hits keep gn3's - field names and are re-wrapped in the envelope. + field names and are re-wrapped in the envelope. Parameters: `q` + (xapian syntax, e.g. `serotonin AND midbrain AND group:BXD`), `type` + (`phenotype` or `gene`), `limit` (default 20, at most 100), and + optionally `sort` (`lrs` or `lod`, which order identically) with + `order` (`desc`, the default, or `asc`). + + Two fields are added to every hit: `lod` (`lrs` / 4.61) and, for + phenotype hits, `locus`, the peak marker's name from `PublishXRef` + (null for other hits, or when the database is unreachable). With + `sort`, gn3 is asked for its first 1000 matches by relevance, those + are ranked, and `limit` is applied afterwards; hits with no `lrs` + come last. For example, the highest-LOD trait about serotonin in BXD + midbrain: `/search?q=serotonin AND midbrain AND group:BXD&sort=lod`. + Tissue and sex are not fields: they appear in each hit's description, + so match them there. Needs a reachable gn3, configured via the `GN3_URL` config key (default `http://127.0.0.1:5003/api/`). diff --git a/src/db.rs b/src/db.rs index 10bef16..edc96e0 100644 --- a/src/db.rs +++ b/src/db.rs @@ -37,6 +37,17 @@ fn pool() -> Result { Ok(new_pool) } +/// GeneNetwork stores LRS (likelihood ratio statistic); LOD = LRS / 4.61 +/// (4.61 ~ 2 ln 10). Every `lod` the API reports is derived with this one +/// constant -- in SQL for rows read from the database, via `lod` for +/// values that arrive as LRS (gn3 search hits). +pub const LRS_PER_LOD: f64 = 4.61; + +/// LOD score for an LRS value; see LRS_PER_LOD. +pub fn lod(lrs: f64) -> f64 { + lrs / LRS_PER_LOD +} + #[derive(Serialize, utoipa::ToSchema)] pub struct Species { pub name: String, @@ -327,6 +338,7 @@ pub struct TraitInfo { pub mean: Option, pub locus: Option, pub lrs: Option, + pub lod: Option, pub additive: Option, pub nsamples: Option, pub pre_publication_description: Option, @@ -353,9 +365,11 @@ pub fn get_group_trait_info( let pool = pool()?; let mut conn = pool.get_conn()?; conn.exec_first( - "SELECT PublishXRef.Id AS Id, PublishXRef.PhenotypeId AS PhenotypeId, \ + format!( + "SELECT PublishXRef.Id AS Id, PublishXRef.PhenotypeId AS PhenotypeId, \ PublishXRef.PublicationId AS PublicationId, PublishXRef.mean AS Mean, \ PublishXRef.Locus AS Locus, PublishXRef.LRS AS Lrs, \ + PublishXRef.LRS / {LRS_PER_LOD} AS Lod, \ PublishXRef.additive AS Additive, PublishXRef.NSamples AS Nsamples, \ Phenotype.Pre_publication_description AS PrePublicationDescription, \ Phenotype.Post_publication_description AS PostPublicationDescription, \ @@ -368,7 +382,8 @@ pub fn get_group_trait_info( FROM PublishXRef \ LEFT JOIN Phenotype ON Phenotype.Id = PublishXRef.PhenotypeId \ LEFT JOIN Publication ON Publication.Id = PublishXRef.PublicationId \ - WHERE PublishXRef.InbredSetId = :group_id AND PublishXRef.Id = :trait_id", + WHERE PublishXRef.InbredSetId = :group_id AND PublishXRef.Id = :trait_id" + ), mysql::params! { "group_id" => group_id, "trait_id" => trait_id }, ) } @@ -379,9 +394,11 @@ pub fn get_group_traits(group_id: u16) -> Result, mysql::Error> { let pool = pool()?; let mut conn = pool.get_conn()?; conn.exec( - "SELECT PublishXRef.Id AS Id, PublishXRef.PhenotypeId AS PhenotypeId, \ + format!( + "SELECT PublishXRef.Id AS Id, PublishXRef.PhenotypeId AS PhenotypeId, \ PublishXRef.PublicationId AS PublicationId, PublishXRef.mean AS Mean, \ PublishXRef.Locus AS Locus, PublishXRef.LRS AS Lrs, \ + PublishXRef.LRS / {LRS_PER_LOD} AS Lod, \ PublishXRef.additive AS Additive, PublishXRef.NSamples AS Nsamples, \ Phenotype.Pre_publication_description AS PrePublicationDescription, \ Phenotype.Post_publication_description AS PostPublicationDescription, \ @@ -395,11 +412,39 @@ pub fn get_group_traits(group_id: u16) -> Result, mysql::Error> { LEFT JOIN Phenotype ON Phenotype.Id = PublishXRef.PhenotypeId \ LEFT JOIN Publication ON Publication.Id = PublishXRef.PublicationId \ WHERE PublishXRef.InbredSetId = :group_id \ - ORDER BY PublishXRef.Id", + ORDER BY PublishXRef.Id" + ), mysql::params! { "group_id" => group_id }, ) } +/// Peak marker names for published traits, keyed by (dataset name, +/// PublishXRef.Id), in one query. Traits with no recorded Locus are +/// absent from the result. +pub fn get_publish_loci( + keys: &[(String, u32)], +) -> Result, mysql::Error> { + let pool = pool()?; + let mut conn = pool.get_conn()?; + let pairs = vec!["(?, ?)"; keys.len()].join(", "); + let rows: Vec<(String, u32, String)> = conn.exec( + format!( + "SELECT PublishFreeze.Name, PublishXRef.Id, PublishXRef.Locus \ + FROM PublishXRef \ + JOIN PublishFreeze ON PublishFreeze.InbredSetId = PublishXRef.InbredSetId \ + WHERE PublishXRef.Locus IS NOT NULL \ + AND (PublishFreeze.Name, PublishXRef.Id) IN ({pairs})" + ), + keys.iter() + .flat_map(|(dataset, id)| [mysql::Value::from(dataset), mysql::Value::from(*id)]) + .collect::>(), + )?; + Ok(rows + .into_iter() + .map(|(dataset, id, locus)| ((dataset, id), locus)) + .collect()) +} + /// One expression (ProbeSet) dataset: a ProbeSetFreeze row, matching /// the shape of GeneNetwork2's GET /api/v_pre1/datasets/ /// response (field names there: Id, ProbeFreezeId, AvgID, @@ -754,6 +799,7 @@ pub struct ProbeSetInfo { pub mean: Option, pub locus: Option, pub lrs: Option, + pub lod: Option, pub p_value: Option, pub additive: Option, } @@ -771,6 +817,7 @@ type ProbeSetInfoRow = ( Option, Option, Option, + Option, ); /// Fetch one expression trait's metadata (see ProbeSetInfo) within a @@ -785,12 +832,15 @@ pub fn get_dataset_probeset_info( let pool = pool()?; let mut conn = pool.get_conn()?; conn.exec_first( - "SELECT ProbeSet.Id, ProbeSet.Name, ProbeSet.Symbol, ProbeSet.description, \ + format!( + "SELECT ProbeSet.Id, ProbeSet.Name, ProbeSet.Symbol, ProbeSet.description, \ ProbeSet.Chr, ProbeSet.Mb, ProbeSetXRef.mean, ProbeSetXRef.Locus, \ - ProbeSetXRef.LRS, ProbeSetXRef.pValue, ProbeSetXRef.additive \ + ProbeSetXRef.LRS, ProbeSetXRef.LRS / {LRS_PER_LOD}, ProbeSetXRef.pValue, \ + ProbeSetXRef.additive \ FROM ProbeSet \ JOIN ProbeSetXRef ON ProbeSetXRef.ProbeSetId = ProbeSet.Id \ - WHERE ProbeSetXRef.ProbeSetFreezeId = :dataset_id AND ProbeSet.Name = :probeset_name", + WHERE ProbeSetXRef.ProbeSetFreezeId = :dataset_id AND ProbeSet.Name = :probeset_name" + ), mysql::params! { "dataset_id" => dataset_id, "probeset_name" => probeset_name }, ) .map(|row: Option| { @@ -805,6 +855,7 @@ pub fn get_dataset_probeset_info( mean, locus, lrs, + lod, p_value, additive, )| { @@ -818,6 +869,7 @@ pub fn get_dataset_probeset_info( mean, locus, lrs, + lod, p_value, additive, } @@ -833,15 +885,31 @@ pub fn get_dataset_probesets(dataset_id: u16) -> Result, mysql let pool = pool()?; let mut conn = pool.get_conn()?; conn.exec_map( - "SELECT ProbeSet.Id, ProbeSet.Name, ProbeSet.Symbol, ProbeSet.description, \ + format!( + "SELECT ProbeSet.Id, ProbeSet.Name, ProbeSet.Symbol, ProbeSet.description, \ ProbeSet.Chr, ProbeSet.Mb, ProbeSetXRef.mean, ProbeSetXRef.Locus, \ - ProbeSetXRef.LRS, ProbeSetXRef.pValue, ProbeSetXRef.additive \ + ProbeSetXRef.LRS, ProbeSetXRef.LRS / {LRS_PER_LOD}, ProbeSetXRef.pValue, \ + ProbeSetXRef.additive \ FROM ProbeSet \ JOIN ProbeSetXRef ON ProbeSetXRef.ProbeSetId = ProbeSet.Id \ WHERE ProbeSetXRef.ProbeSetFreezeId = :dataset_id \ - ORDER BY ProbeSet.Id", + ORDER BY ProbeSet.Id" + ), mysql::params! { "dataset_id" => dataset_id }, - |(probeset_id, name, symbol, description, chr, mb, mean, locus, lrs, p_value, additive)| { + |( + probeset_id, + name, + symbol, + description, + chr, + mb, + mean, + locus, + lrs, + lod, + p_value, + additive, + )| { ProbeSetInfo { probeset_id, name, @@ -852,6 +920,7 @@ pub fn get_dataset_probesets(dataset_id: u16) -> Result, mysql mean, locus, lrs, + lod, p_value, additive, } diff --git a/src/routes/search.rs b/src/routes/search.rs index 0a61878..78e3b7c 100644 --- a/src/routes/search.rs +++ b/src/routes/search.rs @@ -3,17 +3,21 @@ //! Phase A (gn4-api-foundation.gmi "Pilot: search"): proxies gn3's //! /api/search (xapian-backed) and re-wraps the hits in the //! descriptive envelope. gn3's hit objects pass through untouched; -//! gn4 contributes boundary validation and the contract. +//! gn4 contributes boundary validation and the contract, plus three +//! additions gn3's hits lack: `lod` (derived from `lrs`), `locus` (the +//! peak marker's name, looked up in PublishXRef) and `sort`/`order`. use axum::Json; use axum::extract::{Extension, Query}; use axum::http::StatusCode; use serde::Deserialize; +use std::collections::HashMap; use std::sync::OnceLock; use std::time::Duration; use tower_http::request_id::RequestId; use crate::auth::AuthToken; +use crate::db; use crate::error::{ApiError, Unauthorized}; use crate::request_id_string; use crate::response::Envelope; @@ -48,8 +52,18 @@ pub struct SearchParams { pub r#type: Option, /// Maximum hits to return (default 20, capped at 100). pub limit: Option, + /// Rank hits by "lrs" or "lod" (the same order) instead of + /// relevance; hits without a value come last. The ranking covers + /// the first 1000 relevance-ranked matches, then `limit` applies. + pub sort: Option, + /// "desc" (default) or "asc"; only meaningful with `sort`. + pub order: Option, } +/// With `sort`, gn3 is asked for this many hits (not just `limit`) so +/// the ranking spans more than one page of relevance-ordered results. +const SORT_FETCH_LIMIT: u64 = 1000; + /// One search hit, in gn3's shape. /// /// Every field is optional because gn3 omits computed values (`lrs`, @@ -69,6 +83,12 @@ pub struct SearchHit { pub mean: Option, pub additive: Option, pub lrs: Option, + /// LOD score, LRS / 4.61; computed here from `lrs`. + pub lod: Option, + /// Name of the peak marker (a Geno.Name such as "rsm10000012461"), + /// looked up in PublishXRef for phenotype hits; null for other + /// hits, or when the database is unavailable. + pub locus: Option, pub geno_chr: Option, pub geno_mb: Option, pub inbredsetcode: Option, @@ -77,6 +97,47 @@ pub struct SearchHit { pub extra: std::collections::BTreeMap, } +/// Orders hits by `lrs` (which orders LOD identically), descending +/// unless `ascending`; hits with no `lrs` always come last. +fn sort_by_lrs(hits: &mut [SearchHit], ascending: bool) { + hits.sort_by(|a, b| match (a.lrs, b.lrs) { + (Some(x), Some(y)) if ascending => x.total_cmp(&y), + (Some(x), Some(y)) => y.total_cmp(&x), + (Some(_), None) => std::cmp::Ordering::Less, + (None, Some(_)) => std::cmp::Ordering::Greater, + (None, None) => std::cmp::Ordering::Equal, + }); +} + +/// Fills in `locus` for phenotype hits from one PublishXRef lookup. +/// A database failure leaves `locus` null rather than failing the +/// search: the hits are still correct, and the marker is also on +/// GET /traits/{dataset}/{trait}. +async fn add_loci(hits: &mut [SearchHit]) { + let keys: Vec<(String, u32)> = hits + .iter() + .filter_map(|hit| { + let dataset = hit.dataset.as_deref().filter(|d| d.ends_with("Publish"))?; + Some((dataset.to_string(), hit.name.as_deref()?.parse().ok()?)) + }) + .collect(); + if keys.is_empty() { + return; + } + let loci: HashMap<(String, u32), String> = + match tokio::task::spawn_blocking(move || db::get_publish_loci(&keys)).await { + Ok(Ok(loci)) => loci, + _ => return, + }; + for hit in hits { + let key = ( + hit.dataset.clone().unwrap_or_default(), + hit.name.as_deref().and_then(|n| n.parse().ok()).unwrap_or(0), + ); + hit.locus = loci.get(&key).cloned(); + } +} + /// gn3's error body for rejected queries: {"error": "", /// "error_type": "..."}. The diagnostic lives under "error"; /// "error_type" leaks Python reprs (e.g. "b'QueryParserError'"), so @@ -124,6 +185,19 @@ pub async fn search( )); } let limit = params.limit.unwrap_or(20).min(100); + if !matches!(params.sort.as_deref(), None | Some("lrs") | Some("lod")) { + return Err(bad_request("sort must be \"lrs\" or \"lod\"")); + } + let ascending = match params.order.as_deref() { + None | Some("desc") => false, + Some("asc") => true, + Some(_) => return Err(bad_request("order must be \"asc\" or \"desc\"")), + }; + let fetch_limit = if params.sort.is_some() { + SORT_FETCH_LIMIT + } else { + limit + }; // Every gn3-side failure maps to one 502 shape; the caller can tell // connectivity, protocol, and backend errors apart by `code`. @@ -144,7 +218,7 @@ pub async fn search( [ ("query", q), ("type", search_type), - ("per_page", &limit.to_string()), + ("per_page", &fetch_limit.to_string()), ], ) .map_err(|e| { @@ -198,8 +272,44 @@ pub async fn search( )); } - let hits: Vec = serde_json::from_str(&body) + let mut hits: Vec = serde_json::from_str(&body) .map_err(|e| backend_error("backend_misbehaving", e.to_string()))?; + for hit in &mut hits { + hit.lod = hit.lrs.map(db::lod); + } + if params.sort.is_some() { + sort_by_lrs(&mut hits, ascending); + } + hits.truncate(limit as usize); + add_loci(&mut hits).await; Ok(Json(Envelope::of(hits))) } + +#[cfg(test)] +mod tests { + use super::*; + use serde_json::json; + + fn hit(lrs: Option) -> SearchHit { + serde_json::from_value(json!({ "lrs": lrs })).unwrap() + } + + fn lrs_of(hits: &[SearchHit]) -> Vec> { + hits.iter().map(|h| h.lrs).collect() + } + + #[test] + fn sort_by_lrs_descending_puts_missing_values_last() { + let mut hits = vec![hit(Some(2.0)), hit(None), hit(Some(9.0)), hit(Some(5.0))]; + sort_by_lrs(&mut hits, false); + assert_eq!(lrs_of(&hits), [Some(9.0), Some(5.0), Some(2.0), None]); + } + + #[test] + fn sort_by_lrs_ascending_still_puts_missing_values_last() { + let mut hits = vec![hit(Some(2.0)), hit(None), hit(Some(9.0)), hit(Some(5.0))]; + sort_by_lrs(&mut hits, true); + assert_eq!(lrs_of(&hits), [Some(2.0), Some(5.0), Some(9.0), None]); + } +} diff --git a/test/data/search_serotonin_midbrain_bxd.json b/test/data/search_serotonin_midbrain_bxd.json new file mode 100644 index 0000000..525d202 --- /dev/null +++ b/test/data/search_serotonin_midbrain_bxd.json @@ -0,0 +1,2998 @@ +[ + { + "additive": 233.98946836805567, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, protein expression: Midbrain serotonin transporter (SERT) expression level quantified by Western blotting in adult males [intensity score]", + "geno_chr": "19", + "geno_mb": 58.673324, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.49128337950074, + "mean": 1627.7004466337316, + "name": "17994", + "pubmed_id": 24405699, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24405699&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 246.22167606388874, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, protein expression: Midbrain serotonin transporter (SERT) expression level quantified by Western blotting in adult females [intensity score]", + "geno_chr": "8", + "geno_mb": 88.388729, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.775868538873917, + "mean": 1284.5950001683727, + "name": "17995", + "pubmed_id": 24405699, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24405699&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -160.90672257230767, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, protein expression: Midbrain serotonin transporter (SERT) expression level quantified by Western blotting in adult males and females [intensity score]", + "geno_chr": "14", + "geno_mb": 33.718101, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.15633117015129, + "mean": 1494.1760045101769, + "name": "17996", + "pubmed_id": 24405699, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24405699&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -1.3041285214285716, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxytryptamine (5-HT, serotonin) level in adult males [ng/mg protein]", + "geno_chr": "16", + "geno_mb": 35.171449, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.999469156515026, + "mean": 12.037411717807545, + "name": "17985", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 2.077018048717949, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxytryptamine (5-HT, serotonin) level in adult females [ng/mg protein]", + "geno_chr": "5", + "geno_mb": 52.439309, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.778209757622893, + "mean": 13.447607176644462, + "name": "17988", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.3192556818181813, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxytryptamine (5-HT, serotonin) level in adult males and females [ng/mg protein]", + "geno_chr": "5", + "geno_mb": 54.593816, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.13478455107461, + "mean": 12.772315803327059, + "name": "17991", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 231.53143313571437, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, protein expression: Diencephalon serotonin transporter (SERT) expression level quantified by Western blotting in adult males [intensity score]", + "geno_chr": "18", + "geno_mb": 35.37302, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.254793802720284, + "mean": 1670.1103497673485, + "name": "17997", + "pubmed_id": 24405699, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24405699&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 287.54810091666667, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, protein expression: Diencephalon serotonin transporter (SERT) expression level quantified by Western blotting in adult females [intensity score]", + "geno_chr": "13", + "geno_mb": 43.326755, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 19.43733802512366, + "mean": 1579.2997878502156, + "name": "17998", + "pubmed_id": 24405699, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24405699&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 187.33853992016805, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, protein expression: Diencephalon serotonin transporter (SERT) expression level quantified by Western blotting in adult males and females [intensity score]", + "geno_chr": "17", + "geno_mb": 76.419153, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.84751809248087, + "mean": 1616.1913998252467, + "name": "17999", + "pubmed_id": 24405699, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24405699&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -647.5889092087912, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxytryptamine (5-HT, serotonin) level in adult males [pg/ul]", + "geno_chr": "16", + "geno_mb": 13.725633, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.535408722907198, + "mean": 6038.655919692095, + "name": "17967", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 828.6074366236841, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxytryptamine (5-HT, serotonin) level in adult females [pg/ul]", + "geno_chr": "12", + "geno_mb": 79.23653, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.175401464107667, + "mean": 6329.651190396013, + "name": "17970", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 610.6371892023805, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxytryptamine (5-HT, serotonin) level in adult males and females [pg/ul]", + "geno_chr": "12", + "geno_mb": 79.23653, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.589317194673665, + "mean": 6106.532879803632, + "name": "17973", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.5790350543859646, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxytryptamine (5-HT, serotonin) level in adult males [ng/mg protein]", + "geno_chr": "15", + "geno_mb": 101.068749, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 17.236457877431263, + "mean": 13.318529409520766, + "name": "17976", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.593005263157894, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxytryptamine (5-HT, serotonin) level in adult females [ng/mg protein]", + "geno_chr": "10", + "geno_mb": 68.357573, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.165027328968513, + "mean": 14.784413830987338, + "name": "17979", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.040418371212121204, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain methionine level in adult males (companion data to VU BXD Midbrain Agilent SurePrint G3 Mouse GE May2012 Quantile) [ug/mg protein]", + "geno_chr": "5", + "geno_mb": 33.515471, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.726916422102892, + "mean": 0.2448537952321417, + "name": "18038", + "pubmed_id": 24405699, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24405699&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.1770666416666677, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxytryptamine (5-HT, serotonin) level in adult males and females [ng/mg protein]", + "geno_chr": "5", + "geno_mb": 52.439309, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.173825249410337, + "mean": 13.904815749118203, + "name": "17982", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.11700757575757578, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxytryptamine turnover rates (5-HIAA/5-HT) in adult males [units]", + "geno_chr": "10", + "geno_mb": 73.927006, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.051407274066586, + "mean": 1.058588231311125, + "name": "17987", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.12139583333333338, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxytryptamine turnover rates (5-HIAA/5-HT) in adult females [units]", + "geno_chr": "1", + "geno_mb": 192.422877, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.047522548183629, + "mean": 1.0970714262553625, + "name": "17990", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.096, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg ip), serotonin (5-HT) concentration in caudate-putamen (striatum) in males 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "4", + "geno_mb": 3.528709, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 18.265907042502196, + "mean": 0.06399999968707562, + "name": "15154", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 1.080420138888889, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxyindoleacetic acid (5-HIAA) level in adult males [ng/mg protein]", + "geno_chr": "9", + "geno_mb": 106.020642, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 8.623128331697162, + "mean": 12.459088185254265, + "name": "17986", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -1.8884539179487176, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxyindoleacetic acid (5-HIAA) level in adult females [ng/mg protein]", + "geno_chr": "3", + "geno_mb": 98.281585, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.867039357476768, + "mean": 14.38396430015564, + "name": "17989", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.1250208333333333, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxytryptamine turnover rate (5-HIAA/5-HT) in adult males and females [units]", + "geno_chr": "10", + "geno_mb": 73.927006, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.582763402304412, + "mean": 1.0714210428689654, + "name": "17993", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.1768421052631581, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Midbrain 5-hydroxyindoleacetic acid (5-HIAA) level in adult males and females [ng/mg protein]", + "geno_chr": "19", + "geno_mb": 60.059033, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.414873502018457, + "mean": 13.374526199541593, + "name": "17992", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.07950000000000003, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), serotonin (5-HT) concentration in caudate-putamen (striatum) in females 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "6", + "geno_mb": 99.716594, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.004991548737546, + "mean": 0.5966666671964858, + "name": "17035", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.16812500000000005, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), serotonin (5-HT) concentration in caudate-putamen (striatum) in 2-4 month-old females 48 h after saline injection (sc) [ug/mg of wet weight]", + "geno_chr": "3", + "geno_mb": 68.64638, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 15.874410302810631, + "mean": 0.6311111052831014, + "name": "17034", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.126875, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), serotonin (5-HT) concentration in caudate-putamen (striatum) in 2-4 month-old mice, sexes combined, 48 h after saline injection (sc) [ug/mg of wet weight]", + "geno_chr": "3", + "geno_mb": 68.64638, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.434108790196223, + "mean": 0.5944444404708015, + "name": "17061", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.10749999999999982, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on the concentration of serotonin (5-HT) in the striatum (caudate-putamen) of 2-4 month old mice, sexes combined, 48h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "3", + "geno_mb": 68.64638, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.984518956494288, + "mean": 0.5488888919353485, + "name": "17062", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.0635, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc) on serotonin (5-HT) concentration in caudate-putamen (striatum) in 2-4 month-old females 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "8", + "geno_mb": 18.445069, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.311160913653202, + "mean": 0.03444444491631455, + "name": "17036", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.02833333333333332, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), 5-HIAA (serotonin metabolite) concentration in caudate-putamen (striatum) in 2-4 month-old mice, sexed combined, 48 h after saline injection (sc) [ug/mg of wet weight]", + "geno_chr": "15", + "geno_mb": 3.793403, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 8.527435494697162, + "mean": 0.1688888900809818, + "name": "17064", + "species": "mouse", + "year": 2014 + }, + { + "additive": -98.3174769861111, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxyindoleacetic acid (5-HIAA) level in adult males [pg/ul]", + "geno_chr": "17", + "geno_mb": 9.273773, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.675737413969498, + "mean": 496.6086452708525, + "name": "17968", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -140.19265506730773, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxyindoleacetic acid (5-HIAA) level in adult females [pg/ul]", + "geno_chr": "3", + "geno_mb": 119.721932, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.873630495212408, + "mean": 696.0859627559267, + "name": "17971", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.01834642857142857, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxytryptamine turnover rates (5-HIAA/5-HT) in adult males [units]", + "geno_chr": "12", + "geno_mb": 54.574026, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.011139874789286, + "mean": 0.08344117672566105, + "name": "17969", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.017516826923076923, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxytryptamine turnover rates (5-HIAA/5-HT) in adult females [units]", + "geno_chr": "3", + "geno_mb": 119.721932, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 9.91209247083553, + "mean": 0.1095172420529456, + "name": "17972", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 97.62039612121211, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxyindoleacetic acid (5-HIAA) level in adult males and females [pg/ul]", + "geno_chr": "15", + "geno_mb": 102.263552, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.664916157257583, + "mean": 592.657190271326, + "name": "17974", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.014433823529411765, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Blood chemistry: Blood 5-hydroxytryptamine turnover rates (5-HIAA/5-HT) in adult males and females [units]", + "geno_chr": "16", + "geno_mb": 22.882777, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.110395709897459, + "mean": 0.09851351380348206, + "name": "17975", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.0764340277777778, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxytryptamine turnover rates (5-HIAA/5-HT) in adult males [units]", + "geno_chr": "13", + "geno_mb": 53.971495, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.826914072795242, + "mean": 0.8538823513423696, + "name": "17978", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.09615526315789477, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxytryptamine turnover rates (5-HIAA/5-HT) in adult females [units]", + "geno_chr": "13", + "geno_mb": 48.647001, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.676502343121502, + "mean": 0.9388965532697481, + "name": "17981", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.1323015873015891, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxyindoleacetic acid (5-HIAA) level in adult males [ng/mg protein]", + "geno_chr": "10", + "geno_mb": 119.801777, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.926410653496625, + "mean": 11.04235297090867, + "name": "17977", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -1.8521298701298705, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxyindoleacetic acid (5-HIAA) level in adult females [ng/mg protein]", + "geno_chr": "18", + "geno_mb": 73.440623, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.02624424901338, + "mean": 13.699413792840366, + "name": "17980", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.06173214285714284, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxytryptamine turnover rates (5-HIAA/5-HT) in adult males and females [units]", + "geno_chr": "18", + "geno_mb": 29.16231, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 9.477316043806614, + "mean": 0.8917631632403323, + "name": "17984", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -1.0845897435897442, + "authors": [ + "Ye R", + "Carneiro AM", + "Airey D", + "Sanders-Bush E", + "Williams RW", + "Lu L", + "Wang J", + "Zhang B", + "Blakely RD" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, neurochemistry: Diencephalon 5-hydroxyindoleacetic acid (5-HIAA) level in adult males and females [ng/mg protein]", + "geno_chr": "18", + "geno_mb": 73.932759, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.003722152382272, + "mean": 12.161342031077334, + "name": "17983", + "pubmed_id": 24102824, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=24102824&dopt=Abstract", + "species": "mouse", + "year": 2014 + }, + { + "additive": -2.4939998, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), iron concentration in ventral midbrain (SN and VTA) in 2-4 month-old males 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "3", + "geno_mb": 145.236795, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.265047942033842, + "mean": 27.189999771118163, + "name": "15165", + "species": "mouse", + "year": 2012 + }, + { + "additive": 3.8749999999999996, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response difference (12.5 mg/kg sc vs saline), iron concentration in ventral midbrain (SN and VTA) in 2-4 month-old males 48 h after injection [difference ug/mg]", + "geno_chr": "3", + "geno_mb": 25.041091, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.083702879323026, + "mean": 0.2750000236555934, + "name": "15166", + "species": "mouse", + "year": 2012 + }, + { + "additive": 0.08707219630270643, + "authors": [ + "Longevityteam" + ], + "dataset": "BXD-LongevityPublish", + "dataset_fullname": "BXD-Longevity Phenotypes", + "description": "Aging, metabolism, gastrointestinal system: Liver weight [g]", + "geno_chr": "18", + "geno_mb": 49.591642, + "group": "BXD-Longevity", + "inbredsetcode": "BDL", + "lrs": 33.79219095228861, + "mean": 1.3164334496540422, + "name": "10007", + "species": "mouse", + "year": 2018 + }, + { + "additive": -0.02604962122422893, + "authors": [ + "Longevityteam" + ], + "dataset": "BXD-LongevityPublish", + "dataset_fullname": "BXD-Longevity Phenotypes", + "description": "Aging, metabolism, urogenital system: Kidney weight (bilateral) [g]", + "geno_chr": "2", + "geno_mb": 93.84289, + "group": "BXD-Longevity", + "inbredsetcode": "BDL", + "lrs": 49.58035626211012, + "mean": 0.35531516187844936, + "name": "10009", + "species": "mouse", + "year": 2018 + }, + { + "additive": -11.94241676914376, + "authors": [ + "Longevityteam" + ], + "dataset": "BXD-LongevityPublish", + "dataset_fullname": "BXD-Longevity Phenotypes", + "description": "Aging, metabolism, central nervous system: Brain weight with correction for dissection errors only [mg]", + "geno_chr": "19", + "geno_mb": 23.109814, + "group": "BXD-Longevity", + "inbredsetcode": "BDL", + "lrs": 12.379051375982407, + "mean": 426.3406255245209, + "name": "10008", + "species": "mouse", + "year": 2020 + }, + { + "additive": -3.0783333333333336, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on dopamine concentration in caudate-putamen (striatum) in males 48 h after injection (saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "1", + "geno_mb": 59.379132, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 18.253754046086033, + "mean": 7.780999803543091, + "name": "15139", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": -0.15083333333333335, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on homovanilic acid (HVA) concentration in caudate-putamen in males 48h after injection (saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "1", + "geno_mb": 77.644506, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.267338921902107, + "mean": 0.2010000042617321, + "name": "15142", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 0.12611111111111106, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), 5-HT concentration in caudate-putamen (striatum) in males 48 h after injection (MPTP group) [ug/g wet weight] ", + "geno_chr": "3", + "geno_mb": 68.64638, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.242092915448577, + "mean": 0.4829999923706055, + "name": "15153", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": -0.10833333333333338, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on 5-HIAA (5-HT metabolite) concentration in caudate-putamen (striatum) in males 48 h after injection (MPTP group) [ug/mg total protein]", + "geno_chr": "7", + "geno_mb": 137.860391, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.125997327732037, + "mean": 0.1450000014156103, + "name": "15156", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": -0.08404761904761905, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), 3-methoxytyramine (3-MT, a dopamine metabolite) concentration in caudate-putamen (striatum) in males 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "2", + "geno_mb": 137.956907, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 9.445898380896999, + "mean": 0.2690000034868717, + "name": "15144", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 0.07625, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), 5-HIAA (5-HT metabolite) level in caudate-putamen (striatum) in males 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "X", + "geno_mb": 152.765653, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 15.100626091622711, + "mean": -0.018000000342726707, + "name": "15157", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 0.1660975609756098, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg ip), dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) level in caudate-putamen (striatum) in males 48 h after injection (MPTP group) [ug/mg total protein]", + "geno_chr": "7", + "geno_mb": 125.70582, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 15.09400925361691, + "mean": 0.2769999999552965, + "name": "15135", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": -0.10708333333333336, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg ip), dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) in caudate-putamen (striatum) concentration in males 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "3", + "geno_mb": 138.637199, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.064939985539203, + "mean": 0.2510000005364418, + "name": "15136", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 1.063, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg ip), DOPAC/DA ratio (index of presynaptic dopamine utilization) in caudate-putamen (striatum) in males 48 h after injection (MPTP group) [ug/mg total protein]", + "geno_chr": "17", + "geno_mb": 5.294463, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.894249333912333, + "mean": 4.006999981403351, + "name": "15147", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": -0.11458333333333334, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), glial fibrillary acidic protein (GFAP, a marker of neurotoxicity) in caudate-putamen (striatum) in males 48 h after injection (MPTP group) [ug/g total protein] ", + "geno_chr": "11", + "geno_mb": 64.432706, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.119298288714372, + "mean": 0.3350000038743019, + "name": "15159", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 0.18166666666666662, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), tyrosine hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) in caudate-putamen (striatum) in males 48 h after injection (MPTP group) [ug/g total protein] ", + "geno_chr": "1", + "geno_mb": 152.807974, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.466059745210071, + "mean": 0.7680000126361847, + "name": "15162", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 4.7555555555555555, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg ip), DOPAC/DA ratio (index of presynaptic dopamine utilization) in caudate-putamen (striatum) in males 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "7", + "geno_mb": 137.860391, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.214742915950918, + "mean": -0.990000031888485, + "name": "15148", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 8.893889388888887, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg, sc), HVA/DA (index of postsynaptic dopamine utilization) in caudate-putamen (striatum) in males 48 h after injection (saline minus MPTP group) [ug/mg wet weight]", + "geno_chr": "1", + "geno_mb": 173.532154, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 26.208943652977247, + "mean": -3.8610000729560854, + "name": "15151", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": -0.09900000000000003, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), glial fibrillary acidic protein (GFAP, a marker of neurotoxicity) in caudate-putamen (striatum) in males 48 h after injection (MPTP-Saline group) [ug/g total protein] ", + "geno_chr": "16", + "geno_mb": 3.5, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.609006892354017, + "mean": 0.2030000001192093, + "name": "15160", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 0.2466666666666667, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), tyrosine hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) in caudate-putamen (striatum) in males 48 h after injection (saline-MPTP group) [ug/g total protein] ", + "geno_chr": "5", + "geno_mb": 135.879195, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 15.469809873814828, + "mean": 0.6110000029206276, + "name": "15163", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": -0.09880952380952379, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc) on 3-methoxytyramine (3-MT, a dopamine metabolite) concentration in caudate-putamen (striatum) in 2-4 month-old males 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "5", + "geno_mb": 71.872807, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.904011889462256, + "mean": 0.12500000186264515, + "name": "15145", + "pubmed_id": 23558233, + "pubmed_link": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23558233&dopt=Abstract", + "species": "mouse", + "year": 2013 + }, + { + "additive": 0.20890688259109308, + "authors": [ + "Roy S et al" + ], + "dataset": "BXD-LongevityPublish", + "dataset_fullname": "BXD-Longevity Phenotypes", + "description": "Cofactor, metadata: Reproductive status of female where 0 is virgin, 1 is a retired breeder of unknown parity, 2 is a retired multiparous breeder [parity score]", + "geno_chr": "7", + "geno_mb": 105.551819, + "group": "BXD-Longevity", + "inbredsetcode": "BDL", + "lrs": 16.628986831909003, + "mean": 0.36893203883495146, + "name": "10016", + "species": "mouse", + "year": 2018 + }, + { + "additive": -0.6313414068674804, + "authors": [ + "Longevityteam" + ], + "dataset": "BXD-LongevityPublish", + "dataset_fullname": "BXD-Longevity Phenotypes", + "description": "Eigengene, metabolism, expression: Inflammasome eigengene generated using liver RNA-seq expression for AIM2, CASP1, PYCARD, IL10RA, PTPRC, CD44, IL1B across all ages and diets (PC1 explains 77% of variance) (deprecated, delete or recompute using all data) [PC score]", + "geno_chr": "14", + "geno_mb": 124.108797, + "group": "BXD-Longevity", + "inbredsetcode": "BDL", + "lrs": 17.52515186015115, + "mean": 1.1717255802068394e-05, + "name": "10015", + "species": "mouse", + "year": 2018 + }, + { + "additive": -3.8676785714285713, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on dopamine concentration in caudate-putamen (striatum) in females 48 h after injection (saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "15", + "geno_mb": 100.632092, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.055429230113214, + "mean": 8.768888897365994, + "name": "17030", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.15333333333333332, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on homovanilic acid (HVA) concentration in caudate-putamen in females 48h after injection (saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "11", + "geno_mb": 64.432706, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 24.269909070486722, + "mean": 0.21888888792859185, + "name": "17033", + "species": "mouse", + "year": 2014 + }, + { + "additive": 2.4325000000000006, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), dopamine (DA) concentration in caudate-putamen (striatum) in females 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "4", + "geno_mb": 58.336002, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.605737567868566, + "mean": 6.326666752497355, + "name": "17029", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.038250000000000006, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on DOPAC/DA (index of presynaptic dopamine utilization) in caudate-putamen in females 48h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "1", + "geno_mb": 171.039789, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.804622740663671, + "mean": 0.2499999983443154, + "name": "17038", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.10062500000000002, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), homovanillic acid (HVA) concentration in caudate-putamen (striatum) in males 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "6", + "geno_mb": 142.5, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.968720130550023, + "mean": 0.37100000232458114, + "name": "15141", + "species": "mouse", + "year": 2012 + }, + { + "additive": -0.10749999999999998, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), homovanillic acid (HVA) concentration in caudate-putamen (striatum) in females 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "14", + "geno_mb": 30.957748, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 15.129392407152853, + "mean": 0.3800000018543667, + "name": "17032", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.057999999999999996, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) 5-HT Concentration in Caudate-putamen in2-4 month old mice, sexes combined, 48h after injection (Saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "14", + "geno_mb": 118.462433, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.517595651867243, + "mean": 0.03444444388151169, + "name": "17063", + "species": "mouse", + "year": 2014 + }, + { + "additive": -2.311666500000001, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), dopamine (DA) in caudate-putamen (striatum) in 2-4 month-old males 48 h after saline injection (sc) [ug/mg wet weight]", + "geno_chr": "12", + "geno_mb": 73.833634, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.133893989591982, + "mean": 13.917000007629394, + "name": "15137", + "species": "mouse", + "year": 2012 + }, + { + "additive": -2.931071107142857, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), dopamine (DA) in caudate-putamen (striatum) in 2-4 month-old females 48 h after saline injection (sc) [ug/mg wet weight]", + "geno_chr": "9", + "geno_mb": 41.232838, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.52571343004456, + "mean": 15.095555729336208, + "name": "17028", + "species": "mouse", + "year": 2014 + }, + { + "additive": -2.9152499999999995, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on dopamine concentration in caudate-putamen (striatum) in mice, sexes combined, 48 h after injection (saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "1", + "geno_mb": 59.379132, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.243363975735598, + "mean": 8.273333231608072, + "name": "17057", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.1275, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on homovanilic acid (HVA) concentration in caudate-putamen in mice, sexes combined, 48h after injection (saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "11", + "geno_mb": 64.432706, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.722445824899099, + "mean": 0.19333333066768116, + "name": "17060", + "species": "mouse", + "year": 2014 + }, + { + "additive": -2.6225000000000005, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), dopamine (DA) concentration in caudate-putamen (striatum) in mice, sexes combined, 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "2", + "geno_mb": 137.956907, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 8.480099853691188, + "mean": 6.939999990993076, + "name": "17056", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.07375000000000004, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) 5-HIAA (5-HT metabolite) concentration in caudate-putamen in 2-4 month old mice, sexes combined, 48h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "6", + "geno_mb": 55.165974, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.3573401885028, + "mean": 0.1988888896173901, + "name": "17065", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.1055714285714286, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), homovanillic acid (HVA) concentration in caudate-putamen (striatum) in mice, sexes combined, 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "2", + "geno_mb": 137.471279, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 15.87913520089974, + "mean": 0.3857777814070384, + "name": "17059", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.027, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), 5-HIAA (5-HT metabolite) level in caudate-putamen (striatum) in females 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "3", + "geno_mb": 19.492525, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 9.741758424733169, + "mean": -0.029999999329447746, + "name": "17039", + "species": "mouse", + "year": 2014 + }, + { + "additive": -2.3333333333333335, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), dopamine (DA) in caudate-putamen (striatum) in 2-4 month-old mice, sexes combined, 48 h after saline injection (sc) [ug/mg wet weight]", + "geno_chr": "12", + "geno_mb": 73.833634, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 18.44181116649342, + "mean": 14.718888918558756, + "name": "17055", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.32166666666666666, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) level in caudate-putamen (striatum) in females 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "4", + "geno_mb": 58.336002, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 20.10750935300091, + "mean": 0.48444444355037475, + "name": "17026", + "species": "mouse", + "year": 2014 + }, + { + "additive": -2.2745, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline-MPTP group (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg, sc), HVA/DA (index of postsynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month old females (Saline minus MPTP)", + "geno_chr": "5", + "geno_mb": 132.043948, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 8.25823667745318, + "mean": -2.3122222688463, + "name": "17051", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.06500000000000004, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) in caudate-putamen (striatum) in 2-4 month-old males 48 h after saline injection (sc) [ug/mg wet weight]", + "geno_chr": "10", + "geno_mb": 122.930754, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.880079643758542, + "mean": 0.5280000060796738, + "name": "15134", + "species": "mouse", + "year": 2012 + }, + { + "additive": -0.15999999999999998, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), homovanillic acid (HVA, a dopamine metabolite) in caudate-putamen (striatum) in 2-4 month-old males 48 h after saline injection (sc) [ug/mg wet weight]", + "geno_chr": "16", + "geno_mb": 45.685367, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.034095067647126, + "mean": 0.5720000021159649, + "name": "15140", + "species": "mouse", + "year": 2012 + }, + { + "additive": -0.4428571428571428, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) in caudate-putamen (striatum) in 2-4 month-old females 48 h after saline injection (sc) [ug/mg wet weight]", + "geno_chr": "2", + "geno_mb": 137.471279, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.83608409922537, + "mean": 0.8211111095216539, + "name": "17025", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.10666666666666674, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), homovanillic acid (HVA, a dopamine metabolite) in caudate-putamen (striatum) in 2-4 month-old females 48 h after saline injection (sc) [ug/mg wet weight]", + "geno_chr": "16", + "geno_mb": 45.685367, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.229558053801403, + "mean": 0.5988888872994317, + "name": "17031", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.20999999999999994, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc) on dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) concentration in caudate-putamen (striatum) in females 48h after injection (Saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "6", + "geno_mb": 52.293211, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.669451170365646, + "mean": 0.33666667011049056, + "name": "17027", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.21833333333333335, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) level in caudate-putamen (striatum) in mice, sexes combined, 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "4", + "geno_mb": 58.336002, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.768852038489847, + "mean": 0.38555555997623336, + "name": "17053", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.9233333333333338, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP group) on DOPAC/DA (index of presynaptic dopamine utilization) in caudate-putamen in 2-4 month old females, 48 h after saline injection (sc) [ratio of ug/mg]", + "geno_chr": "4", + "geno_mb": 58.336002, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.137657645664726, + "mean": 6.992222362094456, + "name": "17047", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.7077499999999999, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on DOPAC/DA (index of presynaptic dopamine utilization) in caudate-putamen in 2-4 month old mice, sexes combined, 48h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "17", + "geno_mb": 5.294463, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.082955591859504, + "mean": 5.4399999777476, + "name": "17074", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.05062499999999998, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), DOPAC/DA ratio (index of presynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month-old females 48 h after saline injection (sc) [ratio of ug/mg]", + "geno_chr": "3", + "geno_mb": 68.64638, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 8.607207568436964, + "mean": 0.2200000004635917, + "name": "17037", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.13749999999999998, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), glial fibrillary acidic protein (GFAP, a marker of neurotoxicity) in caudate-putamen (striatum) in females 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "11", + "geno_mb": 64.432706, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 17.409436501984388, + "mean": 0.33666666845480603, + "name": "17041", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.21499999999999997, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), tyrosine hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) in caudate-putamen (striatum) in females 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "4", + "geno_mb": 58.336002, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.44818706589806, + "mean": 0.7500000099341074, + "name": "17044", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.23607142857142857, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) in caudate-putamen (striatum) in 2-4 month-old mice, sexes combined, 48 h after saline injection (sc) [ug/mg wet weight]", + "geno_chr": "2", + "geno_mb": 137.471279, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 15.425994455111601, + "mean": 0.6777777738041348, + "name": "17052", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.20500000000000002, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) Tyrosine Hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) Concentration in Caudate-putamen in 2-4 month old mice, sexes combined, 48h after injection (MPTP group) ([g/mg total protein]", + "geno_chr": "4", + "geno_mb": 58.336002, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.629048127584902, + "mean": 0.7099999984105428, + "name": "17071", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.0647058823529412, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc) on dihydroxyphenylacetic acid (DOPAC, a dopamine metabolite) concentration in caudate-putamen (striatum) in mice, sexes combined, 48h after injection (Saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "13", + "geno_mb": 23.843947, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.577721712970341, + "mean": 0.2955555535025067, + "name": "17054", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.5910000000000002, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), DOPAC/DA ratio (index of presynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month-old males 48 h after saline injection (sc) [ratio of ug/mg]", + "geno_chr": "18", + "geno_mb": 55.966804, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 9.036327527748359, + "mean": 3.877000021934509, + "name": "15146", + "species": "mouse", + "year": 2012 + }, + { + "additive": -0.032500000000000015, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), glial fibrillary acidic protein (GFAP, a marker of neurotoxicity) in caudate-putamen (striatum) in 2-4 month-old females 48 h after saline injection (sc) [ug/mg total protein]", + "geno_chr": "3", + "geno_mb": 129.483519, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.726177253767013, + "mean": 0.13666666630241606, + "name": "17040", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.15166666666666678, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), tyrosine hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) in caudate-putamen (striatum) in 2-4 month-old females 48 h after saline injection (sc) [ug/mg total protein]", + "geno_chr": "15", + "geno_mb": 83.095601, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.5715418809415, + "mean": 1.3088888857099745, + "name": "17043", + "species": "mouse", + "year": 2014 + }, + { + "additive": 2.051666666666667, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), DOPAC/DA ratio (index of presynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month-old females, 48 h after saline injection (sc) [ratio of ug/mg]", + "geno_chr": "4", + "geno_mb": 58.336002, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.937003619764079, + "mean": 5.521111064487034, + "name": "17046", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.05071428571428572, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), 5-HIAA (5-HT metabolite) level in caudate-putamen (striatum) in 2-4 month old mice, sexes combined. 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "5", + "geno_mb": 71.872807, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.810824475069087, + "mean": -0.031111110829644732, + "name": "17066", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.13916666666666666, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on glial acidic fibrillary protein (GFAP, a marker of neurotoxicity) concentration in caudate-putamen in 2-4 month old mice, sexes combined, 48h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "11", + "geno_mb": 64.432706, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 17.5550886625494, + "mean": 0.33444444835186005, + "name": "17068", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.9491666666666667, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on DOPAC/DA (index of presynaptic dopamine utilization) in caudate-putamen in 2-4 month old mice, sexes combined, 48h after injection (Saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "17", + "geno_mb": 3.113765, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.1579448558606, + "mean": -0.7688888824648328, + "name": "17075", + "species": "mouse", + "year": 2014 + }, + { + "additive": -2.113928571428571, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP group (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), HVA/DA (index of postsynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month old females, 48 h after MPTP injection (sc) [ratio of ug/mg]", + "geno_chr": "5", + "geno_mb": 71.872807, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.481465354490828, + "mean": 6.6866667535569935, + "name": "17050", + "species": "mouse", + "year": 2014 + }, + { + "additive": 1.7138888888888895, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), HVA/DA concentration ratio (index of postsynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month-old males 48 h after saline injection (sc) [ratio of ug/mg]", + "geno_chr": "4", + "geno_mb": 96.668598, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.844669447614198, + "mean": 4.105000019073486, + "name": "15149", + "species": "mouse", + "year": 2012 + }, + { + "additive": 1.6512500000000003, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), HVA/DA concentration ratio (index of postsynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month-old females, 48 h after saline injection (sc) [ratio of ug/mg]", + "geno_chr": "4", + "geno_mb": 48.901535, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.8628741727857, + "mean": 4.374444511201647, + "name": "17049", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.19375000000000003, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline-MPTP group (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), tyrosine hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) in caudate-putamen (striatum) in females 48 h after injection (Saline -MPTP) [ug/mg wet weight]", + "geno_chr": "2", + "geno_mb": 41.625955, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.570741306405914, + "mean": 0.5577777839369245, + "name": "17045", + "species": "mouse", + "year": 2014 + }, + { + "additive": -4.956250000000002, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg sc), HVA/DA (index of postsynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month old mice, sexes combined, 48 h after injection (MPTP group) [ug/mg wet weight]", + "geno_chr": "1", + "geno_mb": 173.532154, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 12.913159403982936, + "mean": 6.9088888963063555, + "name": "17077", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.03000000000000002, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), glial acidic fibrillary protein (GFAP, a marker of neurotoxicity) in caudate-putamen (striatum) in 2-4 month-old mice, sexes combined, 48 h after saline injection (sc) [ug/mg total protein]", + "geno_chr": "1", + "geno_mb": 139.244215, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.94183846584173, + "mean": 0.13666666547457376, + "name": "17067", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.10375000000000001, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), tyrosine hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) in caudate-putamen (striatum) in 2-4 month-old mice, sexes combined, 48 h after saline injection (sc) [ug/mg total protein]", + "geno_chr": "16", + "geno_mb": 93.684644, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 10.977412515735452, + "mean": 1.34333332379659, + "name": "17070", + "species": "mouse", + "year": 2014 + }, + { + "additive": -1.2162499999999998, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), DOPAC/DA ratio (index of presynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month-old mice, sexes combined, 48 h after saline injection (sc) [ratio of ug/mg]", + "geno_chr": "2", + "geno_mb": 41.625955, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 14.942473413555174, + "mean": 4.6711111598544655, + "name": "17073", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.11333333333333334, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP-Saline group (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg s.c.), glial fibrillary acidic protein (GFAP, a marker of neurotoxicity) in caudate-putamen (striatum) in females 48 h after injection (MPTP-Saline group) [ug/mg wet weight]", + "geno_chr": "11", + "geno_mb": 64.432706, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 15.100677813681521, + "mean": 0.2022222230831782, + "name": "17042", + "species": "mouse", + "year": 2014 + }, + { + "additive": 0.7191666666666667, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), HVA/DA concentration ratio (index of postsynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month-old mice, sexes combined, 48 h after saline injection (sc) [ratio of ug/mg]", + "geno_chr": "4", + "geno_mb": 94.602661, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 9.354526890921209, + "mean": 3.758888906902737, + "name": "17076", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.15083333333333337, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), homovanillic acid (HVA, a dopamine metabolite) in caudate-putamen (striatum) in 2-4 month-old mice, sexes combined, 48 h after subcutaneous saline injection (BXD40 winsorised from 3.6 to 0.8) [ug/mg wet weight]", + "geno_chr": "16", + "geno_mb": 45.685367, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.49620619835933, + "mean": 0.607777777645323, + "name": "17058", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.23083333333333328, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on tyrosine hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) concentration in caudate-putamen (striatum) in 2-4 onth old mice, sexes combined, 48 h after injection (saline-MPTP group) [ug/mg total protein]", + "geno_chr": "4", + "geno_mb": 58.336002, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 19.63634165848051, + "mean": 0.6211111098527908, + "name": "17072", + "species": "mouse", + "year": 2014 + }, + { + "additive": 5.664375000000001, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine) response (12.5 mg/kg, sc), HVA/DA (index of postsynaptic dopamine utilization) in caudate-putamen (striatum) in 2-4 month old mice, sexes combined, 48 h after injection (saline minus MPTP group) [ug/mg wet weight]", + "geno_chr": "1", + "geno_mb": 173.532154, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.441272644305913, + "mean": -3.1500000440412097, + "name": "17078", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.13267857142857148, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP minus saline group) on glial acidic fibrillary protein (GFAP, a marker of neurotoxicity) concentration in caudate-putamen in 2-4 month old mice, sexes combined, 48h after injection (MPTP minus saline group) [ug/mg total protein]", + "geno_chr": "11", + "geno_mb": 70.557665, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 16.75501473281342, + "mean": 0.2088888900147544, + "name": "17069", + "species": "mouse", + "year": 2014 + }, + { + "additive": -1.5803571428571423, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Effect of 1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine (MPTP) on DOPAC/DA (index of presynaptic dopamine utilization) in caudate-putamen in 2-4 month old females, 48 h after saline injection (sc) [ratio of ug/mg]combined, 48h after injection (Saline-MPTP group) [ug/mg wet weight]", + "geno_chr": "5", + "geno_mb": 13.907252, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 11.778191662597541, + "mean": -0.7633333603541056, + "name": "17048", + "species": "mouse", + "year": 2014 + }, + { + "additive": -0.19499999999999995, + "authors": [ + "Jones BC", + "Miller DB", + "O'Callaghan JP", + "Unger EL", + "Lu L", + "Alam G", + "Williams RW" + ], + "dataset": "BXDPublish", + "dataset_fullname": "BXD Published Phenotypes", + "description": "Central nervous system, pharmacology, toxicology: Saline response, control for MPTP (1-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), tyrosine hydroxylase (TH, rate limiting enzyme for catecholamine synthesis) in caudate-putamen (striatum) in 2-4 month-old males 48 h after saline injection (sc) [ug/mg total protein]", + "geno_chr": "2", + "geno_mb": 122.467269, + "group": "BXD", + "inbredsetcode": "BXD", + "lrs": 13.60300326765553, + "mean": 1.3789999842643739, + "name": "15161", + "species": "mouse", + "year": 2012 + } +] \ No newline at end of file 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(): diff --git a/test/python/test_group_trait_info.py b/test/python/test_group_trait_info.py index d5a0761..1e4fab8 100644 --- a/test/python/test_group_trait_info.py +++ b/test/python/test_group_trait_info.py @@ -36,6 +36,21 @@ class GroupTraitInfoTest(ServerTestCase): finally: conn.close() + def test_group_trait_info_reports_lod_and_locus(self): + # The "highest LOD ... serotonin in BXD male midbrain" trait: see + # test_search.py. `lod` is `lrs` / 4.61. + if not database_reachable(): + self.skipTest("no database on 127.0.0.1:3306") + + response, body = self.get("/groups/BXD/traits/17985") + self.assertEqual(response.status, 200) + + info = json.loads(body) + self.assertEqual(info["locus"], "rsm10000012461") + self.assertAlmostEqual(info["lod"], info["lrs"] / 4.61) + self.assertAlmostEqual(info["lod"], 2.603, places=3) + self.assertAlmostEqual(info["additive"], -1.3041, places=4) + def test_group_trait_info_bxd_returns_phenotype_and_publication(self): if not database_reachable(): self.skipTest("no database on 127.0.0.1:3306") diff --git a/test/python/test_search.py b/test/python/test_search.py index 18cc54c..bfd1d38 100644 --- a/test/python/test_search.py +++ b/test/python/test_search.py @@ -18,11 +18,20 @@ import unittest import urllib.parse from auth_helpers import TOKEN_ENV, auth_server_reachable, auth_token -from server_test_case import HOST, PORT, ServerTestCase, wait_for_port +from server_test_case import ( + HOST, + PORT, + ServerTestCase, + database_reachable, + wait_for_port, +) FIXTURE = os.path.join( os.path.dirname(__file__), "..", "data", "search_alcohol_phenotype.json" ) +SEROTONIN_FIXTURE = os.path.join( + os.path.dirname(__file__), "..", "data", "search_serotonin_midbrain_bxd.json" +) class Gn3StubHandler(http.server.BaseHTTPRequestHandler): @@ -30,7 +39,17 @@ class Gn3StubHandler(http.server.BaseHTTPRequestHandler): def do_GET(self): query = urllib.parse.parse_qs(urllib.parse.urlparse(self.path).query) - if "boom" in query.get("query", [""])[0]: + if "serotonin" in query.get("query", [""])[0]: + # gn3 has no sort of its own: a sorted /search must ask for a + # wide page (1000), not just `limit`, to rank across it. + if query.get("per_page") != ["1000"]: + body = b"per_page must be 1000" + self.send_response(http.client.INTERNAL_SERVER_ERROR) + else: + with open(SEROTONIN_FIXTURE, "rb") as fixture: + body = fixture.read() + self.send_response(http.client.OK) + elif "boom" in query.get("query", [""])[0]: body = b'{"error": "gn3 exploded"}' self.send_response(http.client.INTERNAL_SERVER_ERROR) elif "&&" in query.get("query", [""])[0]: @@ -129,6 +148,76 @@ class SearchTest(ServerTestCase): self.assertEqual(status, http.client.BAD_REQUEST) self.assertIn("phenotype", body["detail"]) + def test_search_validates_sort_and_order(self): + self.require_auth() + + status, body = self.get("/search?q=alcohol&sort=mean") + self.assertEqual(status, http.client.BAD_REQUEST) + self.assertIn("lrs", body["detail"]) + + status, body = self.get("/search?q=alcohol&sort=lod&order=sideways") + self.assertEqual(status, http.client.BAD_REQUEST) + self.assertIn("asc", body["detail"]) + + def test_highest_lod_for_serotonin_in_bxd_male_midbrain(self): + # "What is the highest LOD score, locus marker, and additive + # effect for serotonin in BXD male midbrain?" -- mirrors scenario 7 + # of tests/search.rs. Males only: " males [" matches "adult males [" + # but not "adult females [" or "adult males and females [". + self.require_auth() + + status, body = self.get( + "/search?q=serotonin%20AND%20midbrain%20AND%20group:BXD" + "&sort=lod&limit=100" + ) + self.assertEqual(status, http.client.OK) + hits = body["data"] + self.assertEqual(len(hits), 100) + lods = [hit["lod"] for hit in hits] + self.assertEqual(lods, sorted(lods, reverse=True)) + for hit in hits: + self.assertAlmostEqual(hit["lod"], hit["lrs"] / 4.61) + + male_midbrain = [ + hit + for hit in hits + if "Midbrain" in hit["description"] and " males [" in hit["description"] + ] + serotonin = next( + hit + for hit in male_midbrain + if "5-hydroxytryptamine (5-HT, serotonin) level" in hit["description"] + ) + self.assertEqual(serotonin["name"], "17985") + self.assertAlmostEqual(serotonin["lod"], 2.603, places=3) + self.assertAlmostEqual(serotonin["additive"], -1.3041, places=4) + self.assertEqual(serotonin["geno_chr"], "16") + + # The serotonin transporter (SERT) in the same tissue and sex + # has the higher LOD: "serotonin" is ambiguous between the two. + top = male_midbrain[0] + self.assertEqual(top["name"], "17994") + self.assertAlmostEqual(top["lod"], 3.577, places=3) + self.assertAlmostEqual(top["additive"], 233.99, places=2) + + # The peak marker's name comes from PublishXRef (needs a live + # MariaDB); without one `locus` is null and the above still holds. + if database_reachable(): + self.assertEqual(serotonin["locus"], "rsm10000012461") + self.assertEqual(top["locus"], "rsm10000013922") + + def test_search_orders_ascending(self): + self.require_auth() + + with open(SEROTONIN_FIXTURE) as fixture: + min_lrs = min(hit["lrs"] for hit in json.load(fixture)) + status, body = self.get("/search?q=serotonin&sort=lrs&order=asc&limit=3") + self.assertEqual(status, http.client.OK) + lrs = [hit["lrs"] for hit in body["data"]] + self.assertEqual(len(lrs), 3) + self.assertEqual(lrs[0], min_lrs) + self.assertEqual(lrs, sorted(lrs)) + def test_search_forwards_gn3_parse_errors(self): self.require_auth() diff --git a/tests/dataset_probeset_info.rs b/tests/dataset_probeset_info.rs index 78356f9..7dc012c 100644 --- a/tests/dataset_probeset_info.rs +++ b/tests/dataset_probeset_info.rs @@ -44,6 +44,8 @@ async fn dataset_probeset_info_returns_gene_annotation() { let info: Value = serde_json::from_slice(&body).unwrap(); assert_eq!(info["name"], "100001_at"); + let (lrs, lod) = (info["lrs"].as_f64().unwrap(), info["lod"].as_f64().unwrap()); + assert!((lod - lrs / 4.61).abs() < 1e-9, "lod is lrs / 4.61"); assert_eq!(info["symbol"], "Cd3g"); assert!(info["mean"].as_f64().is_some()); } diff --git a/tests/group_trait_info.rs b/tests/group_trait_info.rs index b8bda4c..f1d089a 100644 --- a/tests/group_trait_info.rs +++ b/tests/group_trait_info.rs @@ -109,3 +109,38 @@ async fn group_trait_info_unknown_trait_in_group_returns_404() { assert_eq!(error["code"], "trait_not_found"); assert_eq!(error["operation_id"], "group_trait_info"); } + +/// The "highest LOD ... serotonin in BXD male midbrain" trait (see +/// tests/search.rs scenario 7): midbrain 5-HT level in adult males. +/// Pins the marker name and that `lod` is `lrs` / 4.61. +#[tokio::test] +async fn group_trait_info_reports_lod_and_locus() { + if !common::db_available() { + eprintln!( + "skipping group_trait_info_reports_lod_and_locus: no usable database (check SQL_URI credentials)" + ); + return; + } + let Some(token) = common::auth_token().await else { + eprintln!("skipping group_trait_info_reports_lod_and_locus: no token (see docs/gn-auth.md)"); + return; + }; + + let response = common::get_with_token( + "GET /groups/BXD/traits/17985", + "/groups/BXD/traits/17985", + &token, + ) + .await; + + assert_eq!(response.status(), StatusCode::OK); + + let body = response.into_body().collect().await.unwrap().to_bytes(); + let info: Value = serde_json::from_slice(&body).unwrap(); + + assert_eq!(info["locus"], "rsm10000012461"); + let (lrs, lod) = (info["lrs"].as_f64().unwrap(), info["lod"].as_f64().unwrap()); + assert!((lod - lrs / 4.61).abs() < 1e-9); + assert!((lod - 2.603).abs() < 0.001); + assert!((info["additive"].as_f64().unwrap() - -1.3041).abs() < 0.0001); +} diff --git a/tests/search.rs b/tests/search.rs index f10c05d..cc1c959 100644 --- a/tests/search.rs +++ b/tests/search.rs @@ -31,10 +31,19 @@ use serde_json::{Value, json}; use std::collections::HashMap; use tower::ServiceExt; +#[allow(dead_code)] +mod common; + /// Recorded from production on 2026-10-03: /// https://genenetwork.org/api3/search/?query=alcohol&type=phenotype&per_page=5 const FIXTURE: &str = include_str!("../test/data/search_alcohol_phenotype.json"); +/// Recorded from production on 2026-10-07: +/// https://genenetwork.org/api3/search/?query=serotonin+AND+midbrain+AND+group:BXD&type=phenotype&per_page=1000 +/// The hits behind the "highest LOD ... serotonin in BXD male midbrain" +/// scenario (7 below): 119 real BXD phenotype hits, noise included. +const SEROTONIN_FIXTURE: &str = include_str!("../test/data/search_serotonin_midbrain_bxd.json"); + /// Committed test-only key material: the JWKS gn-auth is stubbed with, /// and the matching RSA private key used to sign tokens locally. See /// test/data/test_jwks.json. @@ -43,6 +52,14 @@ const TEST_PRIVATE_KEY: &str = include_str!("../test/data/test_rsa_private.pem") /// Stands in for gn3's /api/search during tests. async fn serve_gn3(Query(params): Query>) -> (StatusCode, String) { + if params.get("query").is_some_and(|q| q.contains("serotonin")) { + // gn3 has no sort of its own: a sorted /search must ask for a + // wide page (1000), not just `limit`, to rank across it. + if params.get("per_page").map(String::as_str) != Some("1000") { + return (StatusCode::INTERNAL_SERVER_ERROR, "per_page must be 1000".into()); + } + return (StatusCode::OK, SEROTONIN_FIXTURE.to_string()); + } if params.get("query").is_some_and(|q| q.contains("&&")) { // Mirrors production gn3's shape for rejected xapian // queries: the diagnostic is under "error", and "error_type" @@ -203,6 +220,95 @@ async fn search_proxy_scenarios() { assert_eq!(status, StatusCode::BAD_GATEWAY); assert_eq!(body["code"], "backend_error"); + // 6. sort and order are validated before gn3 is touched. + let (status, body) = get_json("/search?q=alcohol&sort=mean", token).await; + assert_eq!(status, StatusCode::BAD_REQUEST); + assert_eq!(body["code"], "invalid_parameter"); + assert!(body["detail"].as_str().unwrap().contains("lrs")); + + let (status, body) = get_json("/search?q=alcohol&sort=lod&order=sideways", token).await; + assert_eq!(status, StatusCode::BAD_REQUEST); + assert!(body["detail"].as_str().unwrap().contains("asc")); + + // 7. The question: "What is the highest LOD score, locus marker, + // and additive effect for serotonin in BXD male midbrain?" + // Search the BXD group ranked by LOD, then take the best hit + // whose description is a male-midbrain trait. (Males only: + // " males [" matches "adult males [" but not "adult females [" + // or "adult males and females [".) + let (status, body) = get_json( + "/search?q=serotonin%20AND%20midbrain%20AND%20group:BXD&sort=lod&limit=100", + token, + ) + .await; + assert_eq!(status, StatusCode::OK); + let hits = body["data"].as_array().unwrap(); + assert_eq!(hits.len(), 100, "119 recorded hits, truncated to limit"); + let lods: Vec = hits.iter().map(|h| h["lod"].as_f64().unwrap()).collect(); + assert!(lods.windows(2).all(|w| w[0] >= w[1]), "descending by lod"); + for hit in hits { + let (lrs, lod) = (hit["lrs"].as_f64().unwrap(), hit["lod"].as_f64().unwrap()); + assert!((lod - lrs / 4.61).abs() < 1e-9, "lod is lrs / 4.61"); + } + let male_midbrain = |hit: &&Value| { + let d = hit["description"].as_str().unwrap(); + d.contains("Midbrain") && d.contains(" males [") + }; + let is_5ht_level = |hit: &&Value| { + hit["description"] + .as_str() + .unwrap() + .contains("5-hydroxytryptamine (5-HT, serotonin) level") + }; + + // Serotonin itself (the 5-HT level): trait 17985. + let serotonin = hits + .iter() + .filter(male_midbrain) + .find(is_5ht_level) + .expect("a male midbrain 5-HT level hit"); + assert_eq!(serotonin["name"], "17985"); + assert_eq!(serotonin["dataset"], "BXDPublish"); + assert!((serotonin["lod"].as_f64().unwrap() - 2.603).abs() < 0.001); + assert!((serotonin["additive"].as_f64().unwrap() - -1.3041).abs() < 0.0001); + assert_eq!(serotonin["geno_chr"], "16"); + + // The serotonin transporter (SERT) protein in the same tissue and + // sex has the higher LOD, and is the top male-midbrain hit overall: + // "serotonin" in the question is ambiguous between the two. + let top = hits.iter().find(male_midbrain).unwrap(); + assert_eq!(top["name"], "17994"); + assert!((top["lod"].as_f64().unwrap() - 3.577).abs() < 0.001); + assert!((top["additive"].as_f64().unwrap() - 233.99).abs() < 0.01); + + // The peak marker's name comes from PublishXRef, so this part needs + // a live MariaDB; without one, `locus` is null and the rest above + // still holds. + if common::db_available() { + assert_eq!(serotonin["locus"], "rsm10000012461"); + assert_eq!(top["locus"], "rsm10000013922"); + } else { + eprintln!("skipping locus checks: no usable database (check SQL_URI credentials)"); + } + + // 8. order=asc reverses the ranking. + let recorded: Vec = serde_json::from_str(SEROTONIN_FIXTURE).unwrap(); + let min_lrs = recorded + .iter() + .map(|h| h["lrs"].as_f64().unwrap()) + .fold(f64::INFINITY, f64::min); + let (status, body) = get_json( + "/search?q=serotonin&sort=lrs&order=asc&limit=3", + token, + ) + .await; + assert_eq!(status, StatusCode::OK); + let hits = body["data"].as_array().unwrap(); + assert_eq!(hits.len(), 3); + assert_eq!(hits[0]["lrs"].as_f64().unwrap(), min_lrs); + assert!(hits[0]["lrs"].as_f64() <= hits[1]["lrs"].as_f64()); + assert!(hits[1]["lrs"].as_f64() <= hits[2]["lrs"].as_f64()); + // A locally signed token with the wrong key (or a tampered one) is // rejected instead of reaching gn3 -- the point of the JWKS stub. let (status, body) = get_json("/search?q=alcohol", Some("not-a-real-token")).await; -- cgit 1.4.1