Skip to content

Commit

Permalink
Extend annotations schema
Browse files Browse the repository at this point in the history
See <nextstrain/auspice#1684> for the context
for these additions.
  • Loading branch information
jameshadfield committed Aug 16, 2023
1 parent ea250de commit d763c05
Showing 1 changed file with 49 additions and 4 deletions.
53 changes: 49 additions & 4 deletions augur/data/schema-annotations.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand All @@ -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"
}
}
}
}
}
}
}
}

0 comments on commit d763c05

Please sign in to comment.