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

Number of variable sites (not just num_sites) #2899

Open
hyanwong opened this issue Feb 7, 2024 · 1 comment
Open

Number of variable sites (not just num_sites) #2899

hyanwong opened this issue Feb 7, 2024 · 1 comment

Comments

@hyanwong
Copy link
Member

hyanwong commented Feb 7, 2024

Just a quick thought: would it be helpful to cache the number of variable sites in a tree sequence, as well as the number of actual sites? I am starting to encounter cases where sites are defined but have no associated mutations. ts.num_variable_sites would seem like a sensible thing. I guess it might get hairy when there are mutations but no variation, however (e.g. if the mutations are reverted, or do not change the state)

@jeromekelleher
Copy link
Member

It's not trivial for the reasons you outline. Zero mutation sites is easy to do though, and we use that somewhere else

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