refactor: make the graph the single source for tree output#858
Merged
Conversation
- Apply output topology preferences in place before every tree writer reads the final graph.\n- Remove TreeIR projections and command-specific format gates so adapters read command graph data directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor/graph-io-single-source->fix/clock-negative-rate-warnResolve:
Update:
Create:
Tree output was projected through an intermediate
TreeIRlayer built separately from the command graph. Direct formats (Newick, Nexus) consumed the ordered graph whileTreeIR-backed formats (Auspice, PhyloXML, UShER MAT) projected the original graph, so the same output plan could carry different node orders, and the projection duplicated logic that drifted from the graph.Make the graph authoritative for every writer [src]. Output topology order is applied once, in place, before any writer reads the graph, and each format adapter reads the command graph data directly instead of a projection. Auspice gains the
updatedmetadata androot_sequenceit was missing, and UShER export warns rather than fabricating a reference allele from a branch-local parent.The single-source design removes the class of bugs where two representations of one tree disagree. Node ordering, mutation projection, and reference-sequence population now have exactly one producer, and the augur-facing formats match augur's node identity and ordering.
Work items
TreeIRprojection layer; format adapters read the command graph directly [src]Mutation/MutationEventmodel for format projection [src]