Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Define JSON Schemas for ontology data release artifacts #32

Merged
merged 5 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
76 changes: 76 additions & 0 deletions artifact-schemas/all_ontology_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Valid Ontology Term JSON Schema",
"description": "Schema for file containing metadata for Ontology Terms accepted in dataset submissions to CZ CellXGene Data Portal.",
"type": "object",
"properties": {
"EFO": { "$ref": "#/definitions/ontologyCategory" },
"UBERON": { "$ref": "#/definitions/ontologyCategory" },
"CL": { "$ref": "#/definitions/ontologyCategory" },
"HANCESTRO": { "$ref": "#/definitions/ontologyCategory" },
"HsapDv": { "$ref": "#/definitions/ontologyCategory" },
"MmusDv": { "$ref": "#/definitions/ontologyCategory" },
"PATO": { "$ref": "#/definitions/ontologyCategory" },
"NCBITaxon": { "$ref": "#/definitions/ontologyCategory" },
"MONDO": { "$ref": "#/definitions/ontologyCategory" }
},
"additionalProperties": false,
"definitions": {
"ontologyCategory": {
"type": "object",
"patternProperties": {
"^(EFO|UBERON|CL|HANCESTRO|HsapDv|MmusDv|PATO|NCBITaxon|MONDO):[0-9]{7}$": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "human-readable name for the ontology entry."
},
"deprecated": {
"type": "boolean",
"description": "Indicates whether the ontology entry is deprecated."
},
"ancestors": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(EFO|UBERON|CL|HANCESTRO|HsapDv|MmusDv|PATO|NCBITaxon|MONDO):[0-9]{7}$",
"description": "List of ancestor IDs for the ontology entry."
},
"description": "An array of ancestor ontology terms that this term is a subclass of."
},
"comments": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 0,
"description": "Optional comments regarding the ontology entry from ontology curators."
},
"term_tracker": {
"type": "string",
"format": "uri",
"description": "Optional URL to track discussion around the term's history and changes."
},
"consider": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 0,
"description": "Suggests alternative IDs to consider in place of this ontology entry."
},
"replaced_by": {
"type": "string",
"pattern": "^(EFO|UBERON|CL|HANCESTRO|HsapDv|MmusDv|PATO|NCBITaxon|MONDO):[0-9]{7}$",
"description": "If deprecated, the ID of the ontology entry that should canonically replace this one."
}
},
"required": ["label", "deprecated", "ancestors"],
"additionalProperties": false,
}
},
"additionalProperties": false
}
}
}
12 changes: 12 additions & 0 deletions artifact-schemas/cell_class_list_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Curated 'Cell Class' Ontology Terms Schema",
"description": "A schema for validating an array of CL ontology term IDs representing high-level 'Cell Classes', curated for CZ CellxGene use.",
"type": "array",
"items": {
"type": "string",
"pattern": "^CL:[0-9]{7}$"
},
"minItems": 1,
"uniqueItems": true
}
12 changes: 12 additions & 0 deletions artifact-schemas/cell_subclass_list_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Curated 'Cell Subclass' Ontology Terms Schema",
"description": "A schema for validating an array of CL ontology term IDs representing high-level 'Cell Subclasses', curated for CZ CellxGene use.",
"type": "array",
"items": {
"type": "string",
"pattern": "^CL:[0-9]{7}$"
},
"minItems": 1,
"uniqueItems": true
}
17 changes: 17 additions & 0 deletions artifact-schemas/cell_type_descendants_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Cell Type Ontology Descendants Schema",
"description": "Schema for Mapping Cell Type Ontology Terms to its Descendant Cell Type Ontology Terms",
nayib-jose-gloria marked this conversation as resolved.
Show resolved Hide resolved
"type": "object",
"patternProperties": {
"^CL:[0-9]{7}$": {
"type": "array",
"items": {
"type": "string",
"pattern": "^CL:[0-9]{7}$"
},
"description": "An array of CL ontology term IDs that are subclasses of the key CL ontology term ID."
}
},
"additionalProperties": false
}
12 changes: 12 additions & 0 deletions artifact-schemas/organ_list_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Curated 'Organ' Ontology Terms Schema",
"description": "A schema for validating an array of UBERON ontology term IDs representing 'Organ' ontology terms, curated for CZ CellxGene use.",
"type": "array",
"items": {
"type": "string",
"pattern": "^UBERON:[0-9]{7}$"
},
"minItems": 1,
"uniqueItems": true
}
12 changes: 12 additions & 0 deletions artifact-schemas/system_list_schema_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Curated 'System' Ontology Terms Schema",
"description": "A schema for validating an array of UBERON ontology term IDs representing organ 'System' ontology terms, curated for CZ CellxGene use.",
"type": "array",
"items": {
"type": "string",
"pattern": "^UBERON:[0-9]{7}$"
},
"minItems": 1,
"uniqueItems": true
}
17 changes: 17 additions & 0 deletions artifact-schemas/tissue_descendants_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Tissue Ontology Descendants Schema",
"description": "Schema for Mapping Tissue Ontology Terms to its Descendant Tissue Ontology Terms",
nayib-jose-gloria marked this conversation as resolved.
Show resolved Hide resolved
"type": "object",
"patternProperties": {
"^UBERON:[0-9]{7}$": {
"type": "array",
"items": {
"type": "string",
"pattern": "^UBERON:[0-9]{7}$"
},
"description": "An array of UBERON ontology term IDs that are subclasses of the key UBERON ontology term ID."
}
},
"additionalProperties": false
}
12 changes: 12 additions & 0 deletions artifact-schemas/tissue_general_list_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Curated 'Tissue General' Ontology Terms Schema",
"description": "A schema for validating an array of high-level UBERON ontology term IDs representing 'general tissue' ontology terms, curated for CZ CellxGene use.",
"type": "array",
"items": {
"type": "string",
"pattern": "^UBERON:[0-9]{7}$"
},
"minItems": 1,
"uniqueItems": true
}
Loading