Skip to content

union needs to remap individual parent IDs #1225

Closed

Description

@petrelharp

To do this, we need to first build the map of which individual IDs are shared between self and other, by looping over the shared nodes, here. (And, we don't have tests with individual parents to test this.)

(See also #1223.)

Activity

  1. added
    bug
    on Mar 3, 2021
  2. added this to the C API 0.99.11 milestone on Mar 3, 2021
  3. petrelharp commented on Mar 8, 2021

    @petrelharp
    ContributorAuthor

    Related: #1226

  4. benjeffery commented on Mar 9, 2021

    @benjeffery
    Member

    Just working through this, so individuals whose parents are no longer part of the tree sequence will have them set to NULL?

  5. benjeffery commented on Mar 9, 2021

    @benjeffery
    Member

    Doh that was a bad question, I get it now.

  6. benjeffery commented on Mar 9, 2021

    @benjeffery
    Member

    Ok, here's my shot at a better question. What happens when individuals whose nodes are marked as being equivalent in other_node_mapping have parents that are of nodes that are not? This smells like it should be an error?

  7. jeromekelleher commented on Mar 9, 2021

    @jeromekelleher
    Member

    That does sound like it should be an error, but it might be tricky to actually detect? How much consistency checking are we doing now to make sure those nodes are actually equivalent?

  8. benjeffery commented on Mar 9, 2021

    @benjeffery
    Member

    There is TSK_UNION_NO_CHECK_SHARED but that is optional.

  9. jeromekelleher commented on Mar 9, 2021

    @jeromekelleher
    Member

    Well, I guess I'd do individual checks in there, to the extent that other aspects of node identity are checked?

  10. petrelharp commented on Mar 10, 2021

    @petrelharp
    ContributorAuthor

    Ok, here's my shot at a better question. What happens when individuals whose nodes are marked as being equivalent in other_node_mapping have parents that are of nodes that are not? This smells like it should be an error?

    I don't quite understand the question: what's "have parents that are of nodes that are not"?

  11. benjeffery commented on Mar 10, 2021

    @benjeffery
    Member

    I mean that the structure of node parents is not compatible with the structure of individual parents. So you could have parent individuals of node A in other whose nodes are not mapped to the nodes in self that are the parent nodes of the node that is mapped to A.

  12. petrelharp commented on Mar 10, 2021

    @petrelharp
    ContributorAuthor

    Ah. I say we ignore that. There's very few - if any - situations we can be sure of an error. Suppose for instance that A is the parent of B, but only one of A's nodes is present, and B has inherited only from the other of A's nodes; this would look like 'inconsistent parents' unless we notice that we don't have all of A's nodes (and to do that, we'd have to assume a ploidy for A).

  13. jeromekelleher commented on Mar 10, 2021

    @jeromekelleher
    Member

    Yes, let's not worry about it for the moment. Maybe make a note of it in the code as a potential issue that might arise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions