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

Behavior of DiploidPopulation.add_mutation #1180

Closed
molpopgen opened this issue Aug 31, 2023 · 1 comment
Closed

Behavior of DiploidPopulation.add_mutation #1180

molpopgen opened this issue Aug 31, 2023 · 1 comment

Comments

@molpopgen
Copy link
Owner

When there are multiple branches satisfying the desired frequency criterion,
we currently sample from those branches proportionally to their length.

This procedure is likely biased.
For a desired interval [a,b), the weight placed on a branch overlapping
that interval should be length*(min(b,right)-max(a,left)).

(This procedure is implemented in cpp/functions/add_mutation.cc.)

@molpopgen molpopgen modified the milestones: 0.21.0, 0.22.0 Oct 1, 2023
@molpopgen
Copy link
Owner Author

So, #1026 already picked a branch from a tree according to length*(tree span).

But that is not quite right. If the desired range is smaller than the tree span, or only partially overlaps it, then we are off by not accounting for the overlap.

molpopgen added a commit that referenced this issue Nov 11, 2023
user input (along w/branch length) to assign a weight to a branch
in a tree.

Closes #1180
molpopgen added a commit that referenced this issue Nov 11, 2023
…#1228)

user input (along w/branch length) to assign a weight to a branch
in a tree.

Closes #1180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant