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: reconstruction of ambiguous nucs in ancestral parsimony mode #293

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

ivan-aksamentov
Copy link
Member

@ivan-aksamentov ivan-aksamentov commented Dec 6, 2024

Followup of: #292

The transition from character sets to bit sets introduced some confusion in handling of ambiguous characters. Ambiguous characters correspond to multiple canonical characters, so they needed explicit disambiguation and disambiguation when using sets. With profile maps (arrays of floats) and with bitsets (~arrays of bits) this happens transparently: multiple "enabled" bits denote canonical components of an ambiguous character.

Here I introduce precalculated char_to_set and set_to_char maps, which allow to resolve particular combinations of bits from and to characters. This is similar to how profile maps operate, but with bits (0s and 1s) rather than floating point values.

This allows the remaining test for parsimony reconstruction to pass.

Followup of: #292

The transition from character sets to bit sets introduced some confusion in handling of ambiguous characters. Ambiguous characters correspond to multiple canonical characters, so they needed explicit disambiguation and disambiguation when using sets. With profile maps (arrays of floats) and with bitsets (~arrays of bits) this happens transparently: multiple "enabled" bits denote canonical components of an ambiguous character.

Here I introduce precalculated `char_to_set` and `set_to_char` maps, which, allow to resolve particular combinations of bits from and to characters. This is similar to how profile maps operate, but with bits (0s and 1s) rather than floating point values.

This allows the remaining test for parsimony reconstruction to pass.
@ivan-aksamentov ivan-aksamentov merged commit f676392 into rust Dec 6, 2024
14 checks passed
@ivan-aksamentov ivan-aksamentov deleted the fix/parsimony-reconstruction branch December 6, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant