Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal export (no node-data files needed) #1299

Merged
merged 9 commits into from
Sep 20, 2023
Merged
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@
### Features

* Support treetime 0.11.* [#1310][] (@corneliusroemer)
* Allow minimal export using only a (newick) tree in `augur export v2`. [#1299][] (@jameshadfield)
* A number of schema updates and improvements [#1299][] (@jameshadfield)
* We now require all nodes to have `node_attrs` on them with one of `div` or `num_date` present
* Some never-used properties are removed from the schemas, including a pattern for defining nucleotide INDELs which was never used by augur or auspice.
* Tip label defaults are now settable within the auspice-config JSON
Copy link
Member

@corneliusroemer corneliusroemer Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowed per validation in auspice-config but not yet supported by current auspice 🙃

I think my preference would be to first allow something in Auspice, then add it to schema, rather than other way round - but I guess as long as auspice still works and just lacks a minor default feature, it's no a big deal either way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah totally, I forgot that auspice PR hadn't been merged + released. I'll do that today

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auspice 2.49.0 released which parses this display_default. It'll appear on nextstrain.org / auspice.us etc over the coming day or two

* Empty colorings definitions are allowed (the tree will be grey in Auspice)

[#1310]: https://github.com/nextstrain/augur/pull/1310
[#1299]: https://github.com/nextstrain/augur/pull/1299

## 23.0.0 (5 September 2023)

Expand Down
42 changes: 25 additions & 17 deletions augur/data/schema-auspice-config-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
"type" : "string"
},
"colorings": {
"description": "Set traits to be available as color-dropdown options",
"description": "Traits available as color-by options",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"description": "An indiviual color-by for auspice",
"description": "Each object here is an individual coloring, which will populate the sidebar dropdown in auspice",
"additionalProperties": false,
"required": ["key"],
"properties": {
Expand All @@ -32,19 +31,20 @@
},
"type": {
"description": "Defines how the color scale should be constructed",
"$comment": "[augur export v2] will (try to) infer the type if this is not present",
"type": "string",
"enum": ["continuous", "temporal", "ordinal", "categorical", "boolean"]
},
"scale": {
"description": "Provided mapping between trait values & hex values",
"$comment": "NOTE: if supplied here, we will not use information supplied to `augur export` via `--colors` for this coloring.",
"description": "Provided mapping between trait values & hex values. For continuous scales at least 2 items must be specified",
"$comment": "[auspice export v2] preferentially uses this over colors TSV",
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": ["string", "number"],
"description": "For categorical/ordinal scales, this is the (string) value of the trait to associate with the colour. For continuous scales this is the (numeric) value to associate to with the colour, and interpolation will be used to span the domain"
"description": "For categorical/ordinal scales, this is the (string) value of the trait to associate with the colour. For continuous scales this is the (numeric) value to associate with the colour, and interpolation will be used to span the domain"
},
{"type": "string", "description": "color hex value", "pattern": "^#[0-9A-Fa-f]{6}$"}
]
Expand Down Expand Up @@ -143,28 +143,31 @@
},
"build_url": {
"description": "URL with instructions to reproduce build, usually expected to be a GitHub repo URL",
"$comment": "optional",
"$comment": "Auspice displays this at the top of the page as part of a byline",
"type": "string"
},
"filters": {
"type": "array",
"uniqueItems": true,
"minItems": 0,
"items": {
"type": "string"
}
"description": "These appear as filters in the footer of Auspice (which populates the displayed values based upon the tree)",
"$comment": "These values must be present as keys on a tree node -> trait",
"type": "array",
"uniqueItems": true,
"items": {"type": "string"}
},
"display_defaults": {
"description": "Set the defaults for certain display options in Auspice. All are optional.",
"$comment": "Anything able to be encoded in the auspice URL should eventually be an option here, so this will expand over time",
"type": "object",
"additionalProperties": false,
"properties": {
"map_triplicate": {
"type": "boolean"
},
"geo_resolution": {
"$comment": "The value here must be present in geo_resolutions (see above)",
"type": "string"
},
"color_by": {
"$comment": "The value here must be present in the colorings (see above)",
"type": "string"
},
"distance_measure": {
Expand All @@ -181,7 +184,13 @@
"type": "string",
"pattern": "^(none|[a-zA-Z0-9]+)$"
},
"tip_label": {
Copy link
Member

@corneliusroemer corneliusroemer Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inclusion of tip_label is a bug - as Auspice doesn't yet support this tip label. Unless nextstrain/auspice#1692 gets merged soon we should revert this from the schema.
I'm sorry I missed this in review, I'll remember to look more carefully at schema changes.
@jameshadfield

I've made an issue for better support of different auspice schema versions here: #1326

"description": "What tip label should be displayed by default, or 'none' to hide labels by default.",
"$comment": "Should be a key present in (at least some) node_attrs",
"type": "string"
},
"transmission_lines": {
"$comment": "Transmission lines depend on the geo_resolution being defined for internal nodes",
"type": "boolean"
},
"language": {
Expand All @@ -195,8 +204,7 @@
},
"panels": {
"type": "array",
"description": "The panels to display by default.",
"$comment": "optional, but if present must not be empty",
"description": "Panels which start toggled on (default is for all available to be shown)",
"minItems": 1,
"items": {
"type": "string",
Expand All @@ -217,9 +225,9 @@
"type": "string"
},
"panels": {
"description": "The panels available for display",
"$comment": "The frequencies & measurements panel will only be available if defined here (and if their sidecar files are available)",
"type": "array",
"description": "The panels available for display.",
"$comment": "optional",
"minItems": 1,
"items": {
"type": "string",
Expand Down
Loading