hyanwong / giglib

MIT License
4 stars 2 forks source link

Choose breakpoints by rejection sampling #102

Open hyanwong opened 6 months ago

hyanwong commented 6 months ago

@duncanMR points out that it could be much more efficient to pick a point in U for recombination, and try to find an equivalent point in V, retrying if we don't succeed.

This is a very good point. It will not give quite the same answer if there are different lengths of shared sequence in U vs V, as a result of duplications, but it should be quite close. It should deal fine with inversions and deletions though (as these won't have shared MRCAs, and will simply be re-tried)

This would be a good way to speed up the forward simulation (see #86 )

hyanwong commented 2 months ago

We would still need to percolate all the intervals up from V until we intersect with the an interval containing the target position in U, but this is probably a lot less costly than doing every interval in U.