Skip to content

graft together partially overlapping tree sequences #381

@petrelharp

Description

@petrelharp

I want to (a) run two independent simulations that start from the same tree sequence, and then (b) graft these back together. I'm proposing we "graft" together along a given set of nodes. To have it make sense to graft A and B, we need:

  1. to have an identification between a subset of the nodes in A and in B
  2. to have the relationships between those nodes be identical in the two
  3. to have the remaining bits not be contradictory.

Specifically, the bit we want to be identcal between the two is the "shared" bit:

  • target nodes, and their individuals
  • edges for which both parent and child are in the target nodes
  • mutations on those edges

So, to check (2) we would extract the shared bit from both and comparing the resulting tree sequences.

Then, the procedure would be:

  • append the non-shared bit of one tree sequence to the other one
  • sort, and deduplicate sites.

There's various sorts of wierd input that would mess this up (eg case (3) above), and possibly all of these errors would be caught because the resulting tree sequence wouldn't be valid.

We would also want to provide an identification of populations between the two.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions