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

allow genetic_relatedness_vector to take non-sample nodes #2998

Open
petrelharp opened this issue Sep 25, 2024 · 0 comments
Open

allow genetic_relatedness_vector to take non-sample nodes #2998

petrelharp opened this issue Sep 25, 2024 · 0 comments

Comments

@petrelharp
Copy link
Contributor

petrelharp commented Sep 25, 2024

This should entail no changes to the algorithm. The proposal is to add an option, nodes=None, which is like:

This method can compute relatedness to non-sample nodes: if `nodes` is not None,
then `nodes` should be a list of node IDs, and the `j`th row of output will correspond 
to `nodes[j]`. More concretely, if :math:`\bar{C}_{nu}` is the genetic relatedness 
between node `n` and sample `u`, defined in just the same way as above except with 
rows indexed by all nodes `n` instead of only samples, then this method extracts those 
rows of :math:`\bar{C} W` corresponding to `nodes`.
If `nodes=None` (the default), this is equivalent to `nodes=list(ts.samples())`.
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

1 participant