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

Constraining multiple nodes to be at the same time? #316

Open
hyanwong opened this issue Sep 21, 2023 · 3 comments
Open

Constraining multiple nodes to be at the same time? #316

hyanwong opened this issue Sep 21, 2023 · 3 comments

Comments

@hyanwong
Copy link
Member

hyanwong commented Sep 21, 2023

If we have full diploid sequences from an undated historical sample (unusual, I know), then we would want to constrain both nodes to be at the same time.

Similarly, if we have a full ARG in which a single recombination event is represented by 2 recombination nodes (as in msprime), then we would want to keep the nodes at the same time too. See kitchensjn/tskit_arg_visualizer#41 (comment)

I can't think of a nice API for this, though! Perhaps if multiple nodes are in the same individual we should treat them as having identical times?

@nspope
Copy link
Contributor

nspope commented Sep 23, 2023

I think we want to be able to pass in custom priors for particular nodes. Typically, this would be shape/rate of a gamma -- but it could also be the ID of another node, in which case we would make both nodes share the same posterior.

Alternatively, we could have a separate argument, node_equivalence, which would be a list of (non-overlapping) sets of nodes.

In effect, messages passed to either node would be aggregated into the same posterior. Technically this is pretty easy to do, but definitely would involve some rejiggering of the code.

@hyanwong
Copy link
Member Author

Ah, the ID of another node sounds like a plan (and might help with the prior too, if we ever allocate different ones to different nodes.

I'm not sure this is a priority, but it does seem like something we might want to do eventually, right?

@nspope
Copy link
Contributor

nspope commented Sep 23, 2023

I think so? For instance if a tree sequence is inferred in tandem with a known pedigree?

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