-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Define JSON Schemas for ontology data release artifacts (#32)
- Loading branch information
1 parent
e087eca
commit b23894a
Showing
9 changed files
with
210 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "A schema for mapping cell type ontology Terms to its descendant cell type ontology terms", | ||
"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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Ontology Version and Source Schema", | ||
"description": "A schema for the set of valid ontology reference files mapping to a CZ CellXGene Dataset Schema Version", | ||
"type": "object", | ||
"properties": { | ||
"CL": { "$ref": "#/definitions/ontologyEntry" }, | ||
"EFO": { "$ref": "#/definitions/ontologyEntry" }, | ||
"HANCESTRO": { "$ref": "#/definitions/ontologyEntry" }, | ||
"HsapDv": { "$ref": "#/definitions/ontologyEntry" }, | ||
"MONDO": { "$ref": "#/definitions/ontologyEntry" }, | ||
"MmusDv": { "$ref": "#/definitions/ontologyEntry" }, | ||
"NCBITaxon": { "$ref": "#/definitions/ontologyEntry" }, | ||
"UBERON": { "$ref": "#/definitions/ontologyEntry" }, | ||
"PATO": { "$ref": "#/definitions/ontologyEntry" } | ||
}, | ||
"additionalProperties": false, | ||
"definitions": { | ||
"ontologyEntry": { | ||
"type": "object", | ||
"properties": { | ||
"version": { | ||
"type": "string", | ||
"description": "version of ontology canonical to this data release, as defined in its source repo" | ||
}, | ||
"source": { | ||
"type": "string", | ||
"format": "uri", | ||
"description": "Source to find and download canonical ontology version for this data release" | ||
}, | ||
"filetype": { | ||
"type": "string", | ||
"description": "filetype used to build generated artifacts for this ontology data release" | ||
} | ||
}, | ||
"required": ["version", "source", "filetype"], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "A schema for mapping Tissue ontology terms to its descendant Tissue ontology terms", | ||
"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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |