Skip to content

ENH: Augur clade "reconstruction from metadata" mode #1149

Description

@corneliusroemer

Context

augur clades currently places clades by finding the biggest branches on a tree that satisfy each clades defining mutations as provided by the user.

This method has a few downsides: to add a new clade, one needs to manually identify a stable set of mutations. Sometimes, due to artefacts or tree building randomness, this causes clades to not appear where we would want them.

Description

There's an alternative method we could use to annotate clades: reconstructing from the tips inwards, using clade annotations one some or all of the tips in the form of a metadata.tsv

This is essentially how Pango lineages are annotated on the SARS-CoV-2 Nextclade reference tree. All it takes is for the tips to be annotated with the clades one would want them to have.

This is easily implemented using treetime's discrete ancestral state reconstruction, already used in augur ancestral and augur traits.

Use cases include:

  • reconstructing internal state of Pango lineages on ncov trees: all the tips have that information in the metadata
  • users being able to specify clades with just a handful of example sequences, without having to dig into exact defining mutations

It would be possible to pass a clade hierarchy to ensure clades are less often reversed. Rather than reconstructing one discrete state with as many values as there are clades, we could reconstruct as many binary states as there are clades. For example, a tip that has XBB.1.5 (23A) set to true would also be true for XBB (22F) but not vice versa. The most specific clade that is true is chosen as annotation. Conflicts need to be resolved with a heuristic, but are rare. This is the way the Nextclade Pango annotation works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions