-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Add a "Variables" tab to the study detail page that shows the variables measured in each dbGaP study, organized by concept category.
Requirements
1. Category Tree Display
Variables are grouped into a tree using the existing classification hierarchy:
NCPI Category (e.g. "ncpi:biomarkers")
└─ Concept (e.g. "topmed:hdl_cholesterol")
└─ Variable (e.g. "HDL - HDL cholesterol mg/dL") ← only for small studies
- Only show populated categories — omit any NCPI category or concept with zero variables in the study.
- Walk the ISA hierarchy (
concept-isa.json) from each variable'sconcept_idup to its NCPI category (ncpi-categories.json). - Unclassified variables (no
concept_id) go under an "Other / Unclassified" group.
2. Tiered Display by Study Size
- ≤200 variables: Show the full tree including individual variables (name + description) under each concept.
- >200 variables: Show the tree down to the concept level only (category → concept with variable counts). Individual variables are not listed.
Study size distribution: 2,721 studies (95%) have ≤200 variables; 143 studies have >200.
3. Data Sources (JSON only, no DuckDB needed)
All data can be computed at build time from these files:
| File | Purpose |
|---|---|
catalog-build/classification/output/llm-concepts-v4/phs*.json |
Variables with concept_id per study |
catalog-build/classification/output/concept-isa.json |
Concept → parent category mapping |
catalog-build/classification/output/ncpi-categories.json |
Top-level NCPI category names/descriptions |
catalog-build/classification/output/concept-vocabulary.json |
Concept names and descriptions |
4. Build-Time Computation
For each study:
- Read
llm-concepts-v4/phs{study}.json - Group variables by
concept_id - Walk ISA hierarchy to resolve each concept to its NCPI category
- Emit a tree structure:
{ category → { concept → [variables] } } - Include variable count per concept (always) and variable details (only if study total ≤200)
Design
- Add a new "Variables" tab on the study detail page, next to the existing Publications tab.
- Tree is collapsible by category.
- Support search/filter within the variable list for studies that show individual variables.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels