Skip to content

Commit

Permalink
Merge pull request #1299 from nextstrain/export-sans-node-data
Browse files Browse the repository at this point in the history
Minimal export (no node-data files needed)
  • Loading branch information
jameshadfield authored Sep 20, 2023
2 parents b299059 + 9afa278 commit e19b5e5
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 260 deletions.
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
* 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": {
"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

0 comments on commit e19b5e5

Please sign in to comment.