Skip to content

tsk_tree_copy(...) does not copy value of tsk_tree_t.mark #925

Closed

Description

@castedo

I noticed in tskit/trees.c that

tsk_tree_copy(tsk_tree_t *self, tsk_tree_t *dest, tsk_flags_t options)

does not copy the value of

uint8_t mark;
from self to dest. The unit test for tree_tree_copy does not check for mark getting copied.

Shouldn't mark get copied?

Activity

  1. jeromekelleher commented on Oct 24, 2020

    @jeromekelleher
    Member

    I think mark will get removed at some point - as far as I know, it's only used in the ld_calculator and we'll be rewriting/generalising this "soon" as part of the generalised two-site statistics (https://github.com/tskit-dev/tskit/projects/1)

    Whether we should update it is debateable - I'm inclined not to, since things are currently working and it's scheduled for removal. We should document it as such in the code though, to avoid confusion.

  2. added
    C API
    refactoring
    and removed
    refactoring
    on Oct 24, 2020
  3. added this to the C API 1.0.0 milestone on Jul 23, 2021
  4. jeromekelleher commented on Jul 23, 2021

    @jeromekelleher
    Member

    Added to C API 1.0 - we should clear this cruft out, if we can at all.

  5. jeromekelleher commented on Sep 10, 2021

    @jeromekelleher
    Member

    This is an undocumented feature of the tree, and will be removed (or generalised) at some point in the future.

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

    C API

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions