Skip to content

Commit

Permalink
[schema] improve mutations
Browse files Browse the repository at this point in the history
Removes previously valid string patterns which were never used within
augur and would result in unexpected behaviour in auspice.
Also updates the patternProperties of CDSs to match that used in the
genome_annotations (schema-annotations.json)
  • Loading branch information
jameshadfield committed Aug 31, 2023
1 parent b3a39a6 commit 6c30b9e
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions augur/data/schema-export-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,27 +292,22 @@
}
},
"mutations": {
"description": "Mutations occuring between the parent and this node",
"$comment": "same numbering scheme as used by the meta.JSON -> annotations",
"$comment": "combining nuc + AAs parallels the metadata -> annotations structure",
"description": "Mutations on the branch leading to this node. 1-based numbering (same as genome_annotations)",
"type": "object",
"additionalProperties": false,
"properties": {
"nuc": {
"description": "nucelotide mutations",
"description": "nucleotide mutations",
"type": "array",
"items": {
"oneOf": [
{"type": "string", "pattern": "^[ATCGNYRWSKMDVHB-][0-9]+[ATCGNYRWSKMDVHB-]$"},
{"type": "string", "pattern": "^insertion [0-9]+-[0-9]+$", "$comment": "TODO unused by auspice"},
{"type": "string", "pattern": "^deletion [0-9]+-[0-9]+$", "$comment": "TODO unused by auspice"}
]
"type": "string",
"pattern": "^[ATCGNYRWSKMDVHB-][0-9]+[ATCGNYRWSKMDVHB-]$"
}
}
},
"patternProperties": {
"^[a-zA-Z0-9_-]+$": {
"description": "Amino acid mutations for this gene (or annotated region)",
"^(?!nuc)[a-zA-Z0-9*_-]+$": {
"description": "Amino acid mutations for this CDS",
"$comment": "properties must exist in the meta.JSON -> annotation object",
"type": "array",
"items": {
Expand Down

0 comments on commit 6c30b9e

Please sign in to comment.