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

fix: zero length branches can still have aa mutations even without nu… #1249

Merged
merged 22 commits into from
Sep 12, 2023
Merged
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6eee1d4
fix: zero length branches can still have aa mutations even without nu…
rneher Sep 8, 2023
e4c995d
fix: adjust error message
rneher Sep 8, 2023
7a11528
docs: add comments
rneher Sep 8, 2023
b19e402
refactor: simplify node name retrieval
rneher Sep 8, 2023
15757ec
refactor: reduce code duplication in tree fine-tuning
rneher Sep 8, 2023
491100d
refactor: extract find_shared_muts() function
ivan-aksamentov Sep 11, 2023
c1567c6
refactor: extract update_private_mutations() function
ivan-aksamentov Sep 11, 2023
309fc37
refactor: extract find_better_node() function
ivan-aksamentov Sep 11, 2023
1c2c00e
refactor: extract find_better_node_maybe() function
ivan-aksamentov Sep 11, 2023
2ac268e
feat: break from loop if no parent node, rather than throwing
ivan-aksamentov Sep 11, 2023
71c61ee
fix: copypasted strings
ivan-aksamentov Sep 11, 2023
b4f4214
refactor: simplify comparison
ivan-aksamentov Sep 11, 2023
c574491
refactor: update comments
ivan-aksamentov Sep 11, 2023
0cb9c01
feat: improve error handling
ivan-aksamentov Sep 11, 2023
a442999
refactor: change terminology of var names in tree finetuning
ivan-aksamentov Sep 11, 2023
52dd4f8
refactor: simplify find_better_node_maybe
rneher Sep 11, 2023
41f79fb
fix: only consider acgt mutations when moving up the tree
rneher Sep 11, 2023
d25c973
feat: account for placement mask, compare nodes based on mut score
ivan-aksamentov Sep 11, 2023
ddd2389
feat: fix splitting into masked+unmasked and split correct set
rneher Sep 11, 2023
b642cc7
Merge pull request #1252 from nextstrain/feat/tree-builder-score
ivan-aksamentov Sep 12, 2023
894409f
Merge pull request #1251 from nextstrain/fix/ingore-non-acgt-in-tree-ops
ivan-aksamentov Sep 12, 2023
4e5feb7
Merge pull request #1250 from nextstrain/refactor/tree-builder-finetune
ivan-aksamentov Sep 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages_rs/nextclade/src/tree/tree_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ pub fn finetune_nearest_node(
current_best_node.payload().name
)
})?;
private_mutations = union_of_muts(&private_mutations, &best_split_result.left.invert()).wrap_err_with(|| {
format!(
"When calculating union of mutations between query sequence the zero-length parent node '{}'",
graph.get_node(best_node.key()).expect("Node not found").payload().name
)
})?;
current_best_node = graph
.parent_of_by_key(best_node.key())
.ok_or_else(|| make_internal_report!("Parent node is expected, but not found"))?;
ivan-aksamentov marked this conversation as resolved.
Show resolved Hide resolved
Expand Down