-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add harmonization step to Aligner objects #16
Comments
Other cases to check in the harmonization step:
|
I added basic code for the harmonization step. Implemented two checks: [1] If a node in the tree sequence These 2 checks improved the accuracy of the greedy algorithms by 5-12 points. Now the accuracy for the best configuration is hovering around 90%. @kobrica will take it from here and implement the rest of the checks. |
I have implemented all of the checks, but they need to be tested along with @shz9 functions |
@kobrica Sorry, I haven't had a lot of time to look at your implementation in detail. But it seems there are a couple of syntax errors:
Can you please test your code in a jupyter notebook for now? You can use the template in |
@shz9 I will try to test everything out in jupyter notebook, I think I know what the error is here. |
I re-arranged the code a bit. It doesn't work quite well for the diploid case. |
Aligner objects as currently implemented only map nodes in the tree sequence to nodes in the pedigree. This can be done either iteratively or in one step. One thing that's missing is "harmonization" or "sanity checking" for greedy algorithms. The goal of the harmonization step is to make sure that the mappings make sense and are consistent with other information that we have, e.g.:
n
in the tree sequence is matched to a founder node in the pedigree, then it's likely that all or most of the predecessors ofn
are out-of-pedigree nodes.n_ts
,n_ped
), make sure that their successors and predecessors preserve their time-ordering. For example, no predecessor ofn_ts
should map to a successor ofn_ped
and vice versa.After these sanity checks are implemented and used to correct the mapping (if possible), then one final thing that can be added is the pedigree node to tree-sequence edge mapping:
The text was updated successfully, but these errors were encountered: