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

Zero recombination rate, reprise #814

Open
hyanwong opened this issue Mar 23, 2023 · 1 comment
Open

Zero recombination rate, reprise #814

hyanwong opened this issue Mar 23, 2023 · 1 comment

Comments

@hyanwong
Copy link
Member

hyanwong commented Mar 23, 2023

In #421 we noted an issue with regions of zero recombination, and that it could be solved with a high enough "precision" value. We also said we should follow up if this continues to be an issue.

@benjeffery has just hit this after a day of running match_ancestors on the GeL dataset

image

In this case all the zero recombination rates has been substituted for 1e-20, but were rounded down to zero somewhere inside the tsinfer machinery. Regardless, it should be possible to allow zero rates if mismatch is allowed, so I'm (re)opening an issue about it, as we said we would at the end of the discussion in #421

@benjeffery
Copy link
Member

So I've figured out what was happening here.
I was using the get_rho function from https://github.com/awohns/unified_genealogy_paper/blob/51dc9130275ec93dfeba83bb3d31cf27d95e2dbb/src/run_tsinfer.py#L82
Which creates recombination probabilites using tsinfer.Matcher.recombination_rate_to_dist and tsinfer.Matcher.recombination_dist_to_prob. I was then passing that to the recombination_rate argument. Which tsinfer was converting to probabilities again.

Ideally we would just pass the rate to tsinfer, but then there would be zero probabilities, which is why it is done in get_rho in the first place, I would guess as that has a filter for zeros.

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

No branches or pull requests

2 participants