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

Color shading tracks lineage probabilities through demography #6

Open
apragsdale opened this issue Mar 12, 2021 · 0 comments
Open

Color shading tracks lineage probabilities through demography #6

apragsdale opened this issue Mar 12, 2021 · 0 comments

Comments

@apragsdale
Copy link
Contributor

apragsdale commented Mar 12, 2021

msprime's demography debugger has some methods for computing within and between population coalescence rates as well as probability of finding (e.g. https://github.com/tskit-dev/msprime/blob/main/msprime/demography.py#L2816). Colors and shading of each deme could be set to match the probability that a lineage that starts in a given deme at a given sampling time is in each other deme. I think this would be a really awesome way to visualize the movement and mixing of lineages and ancestry through a deme graph.

If a single deme is specified, the alpha for the color for each deme over time is just the probability that the sampled lineage exists in that deme. If two (or more) are specified, you could imagine shading by the probability that two lineages find themselves in the same deme at a given time. Another possibility is to just overlaying colors so that they bleed into each other, and then at the top of the deme graph in the root population, it would end up being black or brown, or however it turns out by mixing the colors.

I'd be happy to try integrating this type of method here, though I don't know if we'd want to make msprime a dependency of demesdraw. This is a type of visualization that I've been dreaming about for a while now, and I think it would be super useful for people thinking about how lineages mix in complex multipopulation models.

@grahamgower grahamgower added this to the 0.2 milestone Mar 14, 2021
@grahamgower grahamgower removed this from the 0.3 milestone Jan 3, 2022
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