From a9572d5579681cb81126f022df79461667c761b9 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Thu, 14 Mar 2024 20:35:26 +0100 Subject: [PATCH] fix(export): In export schema, allow cds name with `nuc` prefix, as long as not equal to `nuc` (#1434) * fix(export): In export schema, allow cds name with `nuc` prefix, as long as not equal to `nuc` Fixes #1433 * chore(CHANGES): Add changelog entry * fix(export): use correct schema for meta.genome_annotations Co-authored-by: james hadfield --------- Co-authored-by: james hadfield --- CHANGES.md | 3 +++ augur/data/schema-annotations.json | 3 ++- augur/data/schema-export-v2.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7cd4d7f27..4374b15ce 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,9 +10,12 @@ ### Bug Fixes * filter: Updated docs with an example of tiered subsampling. [#1425][] (@victorlin) +* export: Fixes bug [#1433] introduced in v23.1.0, that causes validation to fail when gene names start with `nuc`, e.g. `nucleocapsid`. [#1434][] (@corneliusroemer) [#1425]: https://github.com/nextstrain/augur/pull/1425 [#1429]: https://github.com/nextstrain/augur/pull/1429 +[#1433]: https://github.com/nextstrain/augur/issues/1433 +[#1434]: https://github.com/nextstrain/augur/pull/1434 [#1436]: https://github.com/nextstrain/augur/pull/1436 ## 24.2.3 (23 February 2024) diff --git a/augur/data/schema-annotations.json b/augur/data/schema-annotations.json index 37a9075ac..e064a34bc 100644 --- a/augur/data/schema-annotations.json +++ b/augur/data/schema-annotations.json @@ -24,8 +24,9 @@ } }, "required": ["nuc"], + "additionalProperties": false, "patternProperties": { - "^(?!nuc)[a-zA-Z0-9*_-]+$": { + "^(?!nuc$)[a-zA-Z0-9*_-]+$": { "$comment": "Each object here defines a single CDS", "type": "object", "oneOf": [{ "$ref": "#/$defs/startend" }, { "$ref": "#/$defs/segments" }], diff --git a/augur/data/schema-export-v2.json b/augur/data/schema-export-v2.json index 94e71859d..3ad4b87ec 100644 --- a/augur/data/schema-export-v2.json +++ b/augur/data/schema-export-v2.json @@ -310,7 +310,7 @@ } }, "patternProperties": { - "^(?!nuc)[a-zA-Z0-9*_-]+$": { + "^(?!nuc$)[a-zA-Z0-9*_-]+$": { "description": "Amino acid mutations for this CDS", "$comment": "properties must exist in the meta.JSON -> annotation object", "type": "array",