Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/sddb/_catalog_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
"disease": "string",
"disease_id": "string",
"development_stage": "string",
# Facet hierarchy, computed at the cut from the pinned UBERON/MONDO node graphs + the hub's ordered
# anchor tables (first anchor by id over the term + its ancestors wins; self-anchor is its own organ).
# Unmapped tissue -> system "other tissues"; unmapped disease -> "other conditions"; unknown stays null.
"tissue_system": "string",
"tissue_system_id": "string",
"tissue_organ": "string",
"tissue_organ_id": "string",
"disease_class": "string",
"disease_class_id": "string",
"disease_group": "string",
"disease_group_id": "string",
# technology
"technology": "string",
"assay": "string",
Expand Down
19 changes: 19 additions & 0 deletions tests/test_catalog_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,25 @@ def test_obs_unit_and_segmentation_columns_present():
assert col not in schema.REQUIRED_COLUMNS


def test_facet_hierarchy_columns_present():
# tissue_system/organ + disease_class/group (+ UBERON/MONDO ids) the cut computes from the pinned
# ontology node graphs + anchor tables; nullable strings, not required.
from sddb import _catalog_schema as schema

for col in (
"tissue_system",
"tissue_system_id",
"tissue_organ",
"tissue_organ_id",
"disease_class",
"disease_class_id",
"disease_group",
"disease_group_id",
):
assert schema.CATALOG_COLUMNS[col] == "string"
assert col not in schema.REQUIRED_COLUMNS


_NEW_DATASET_COLUMNS = {
"sample_title": "string",
"timepoint": "string",
Expand Down
Loading