Skip to content

Commit

Permalink
feat: relabel aminoacids when attaching node
Browse files Browse the repository at this point in the history
Followup of: #1526

Additionally to moving clade let's also move "aa" label
  • Loading branch information
ivan-aksamentov committed Oct 18, 2024
1 parent f8b860b commit 8e864ca
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/nextclade/src/tree/tree_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,15 @@ pub fn knit_into_graph(
let target_node = graph.get_node_mut(target_key)?;
if let Some(target_labels) = &mut target_node.payload_mut().branch_attrs.labels {
target_labels.clade = None;
new_internal_node
let aa = target_labels.aa.take();

let labels = new_internal_node
.branch_attrs
.labels
.get_or_insert(TreeBranchAttrsLabels::default())
.clade = clade;
.get_or_insert(TreeBranchAttrsLabels::default());

labels.clade = clade;
labels.aa = aa;
}
}

Expand Down

0 comments on commit 8e864ca

Please sign in to comment.