Skip to content

Commit

Permalink
fix(export): In export schema, allow cds name with nuc prefix, as l…
Browse files Browse the repository at this point in the history
…ong 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 <hadfield.james@gmail.com>

---------

Co-authored-by: james hadfield <hadfield.james@gmail.com>
  • Loading branch information
corneliusroemer and jameshadfield authored Mar 14, 2024
1 parent 82bdf45 commit a9572d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion augur/data/schema-annotations.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }],
Expand Down
2 changes: 1 addition & 1 deletion augur/data/schema-export-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a9572d5

Please sign in to comment.