diff --git a/augur/data/schema-annotations.json b/augur/data/schema-annotations.json index 7e09b9b0e..406978991 100644 --- a/augur/data/schema-annotations.json +++ b/augur/data/schema-annotations.json @@ -6,21 +6,47 @@ "nuc": { "type": "object", "allOf": [{ "$ref": "#/$defs/startend" }], + "properties": { + "strand": { + "type": "string", + "not": {"enum":["-"]}, + "$comment": "Auspice assumes +ve strand for 'nuc', but will not proceed if you specify '-'" + } + }, "additionalProperties": true, - "$comment": "All other properties are unused by Auspice. Strand is always considered to be positive." + "$comment": "All other properties are unused by Auspice." } }, "required": ["nuc"], "patternProperties": { - "^[a-zA-Z0-9*_-]+$": { + "^(?!nuc)[a-zA-Z0-9*_-]+$": { + "$comment": "Each object here defines a single CDS", "type": "object", - "allOf": [{ "$ref": "#/$defs/startend" }], + "oneOf": [{ "$ref": "#/$defs/startend" }, { "$ref": "#/$defs/segments" }], "additionalProperties": true, + "required": ["strand"], "properties": { + "gene": { + "type": "string", + "description": "The name of the gene the CDS is from. Optional.", + "$comment": "Shown in on-hover infobox & influences default CDS colors" + }, "strand": { - "description": "Is the gene on the positive ('+') or negative ('-') strand.", + "description": "Is the CDS on the positive ('+') or negative ('-') strand.", "$comment": "Auspice assumes positive strand unless strand is '-'", "type": "string" + }, + "color": { + "type": "string", + "description": "A CSS color or a color hex code. Optional." + }, + "display_name": { + "type": "string", + "$comment": "Shown in the on-hover info box" + }, + "description": { + "type": "string", + "$comment": "Shown in the on-hover info box" } } } @@ -41,6 +67,25 @@ "description": "End position (one-based, following GFF format). This value _must_ be greater than the start." } } + }, + "segments": { + "type": "object", + "required": ["segments"], + "properties": { + "segments": { + "type": "array", + "items": { + "type": "object", + "allOf": [{ "$ref": "#/$defs/startend" }], + "properties": { + "name": { + "type": "string", + "$comment": "Displayed for the individual CDS segment" + } + } + } + } + } } } }