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

Commits on Sep 20, 2023

  1. Remove unused properties from schema

    These properties were never actually used (neither exported from augur
    export v2 nor consumed by auspice)
    
    Closes #867 <#867>
    jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    fbbc319 View commit details
    Browse the repository at this point in the history
  2. De-duplicate auspice-config + dataset schemas

    A number of parts of the auspice-config have identical (or
    almost-identical) shape to those in the resulting dataset JSON, although
    the actual data may be modified as it passes through `augur export v2`.
    
    Rather than referencing the entire auspice-config schema and pruning
    down properties, which I don't actually think is possible in jsonschema,
    I chose to use $refs at a more fine grained level which I find easier to
    read.
    
    The actual schema definitions should be unchanged by this commit,
    although comments / descriptions have been improved.
    jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    67689a7 View commit details
    Browse the repository at this point in the history
  3. [schema] Allow default tip labels

    Auspice can already set the tip label via URL state (`?tl=...`) and will
    shortly be able to parse the display_default added here.
    
    Closes #1115 <#1115>
    jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    6ce1bf7 View commit details
    Browse the repository at this point in the history
  4. [schema] allow empty colorings definitions

    These work fine in Auspice. While the 'colorings' property is optional,
    `augur export v2` will always set a (possibly empty) array. I also chose
    to allow the auspice config file to have an empty colorings definition,
    which in practice behaves the same as leaving it out.
    
    Addresses comment in #273 <#273 (comment)>
    jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    cee69bc View commit details
    Browse the repository at this point in the history
  5. [schema] improve mutations

    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)
    jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    8209dad View commit details
    Browse the repository at this point in the history
  6. [schema] Enforce some distance measure on trees

    Trees could currently be produced with neither "div" nor "num_date"
    information. Arguably Auspice could interpret these as cladograms
    but as it stands these datasets aren't rendered by Auspice.
    
    Datasets without this information are easy to create but rare in
    practice: If the node-data files don't define "mutation_length" or
    "branch_length" then there's no "div" and if they don't define
    "num_date" then that's not there either.
    
    Note that what we really want to require is that "div" is present on all
    nodes and/or "num_date" is present on all nodes, but the schema doesn't
    let us do this.
    jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    58fed99 View commit details
    Browse the repository at this point in the history
  7. [export] Node-data files are optional

    Allows a minimal `augur export` using only a (newick) tree as input,
    functionality that we've wanted for over 4 years! To facilitate this we
    parse branch lengths¹ from the newick file if such data wasn't available
    in the node-data inputs (e.g. because there are none!).
    
    The code for deciding where to read divergence from has been refactored
    and in the process improved: the (rare? never encountered?) case where
    divergence was sometimes read from node-data keys 'mutation_length' and
    sometimes from 'branch_length' can non longer happen.
    
    If data is provided which doesn't define divergence or num_date
    (irregardless of whether node-data files were provided as inputs), then
    the resulting dataset will fail validation.
    
    Closes #273 <#273>
    
    ¹ I suppose these might represent time in certain cases, but I haven't
    seen such data in Newick files.
    jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    4582a1e View commit details
    Browse the repository at this point in the history
  8. Optionally ignore numeric type changes

    Adds a flag to the diff JSONs script to ignore numeric type changes when
    running DeepDiff [1]. Updates the export v2 minimal export test to use
    this new flag instead of creating an intermediate file with sed.
    
    [1] https://zepworks.com/deepdiff/current/ignore_types_or_values.html
    huddlej authored and jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    22fe6c6 View commit details
    Browse the repository at this point in the history
  9. changelog

    jameshadfield committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    9afa278 View commit details
    Browse the repository at this point in the history