Skip to content

Unify SampleData and AncestorsData file formats #729

Closed

Description

@jeromekelleher

Having a separate format for the AncestorsData and SampleData formats is increasingly a pain. It would be much better if the basic information that was required by the matching engine was shared by both.

The main motivator for having a separate format was to save on space, since nearly all ancestor haplotypes will be short fragments and there didn't seem much point in storing lots of -1s. However, I'm not sure that this space saving was worth it, and it would be good to explore what the space cost of just storing the ancestral sequences in a standard sgkit variant dataset would be.

There would also be some details like storing the focal sites for the generated ancestor, but there may be better (i.e. more general) ways of handling this that'll make tsinfer more flexible.

Activity

  1. jeromekelleher commented on Oct 11, 2022

    @jeromekelleher
    MemberAuthor

    See also #728

  2. added this to the Release 0.4.0 milestone on Oct 26, 2022
  3. benjeffery commented on Nov 7, 2022

    @benjeffery
    Member

    I've started looking into this. It's very easy to change the ancestor format to be a standard zarr directory store, just by removing the lmdb store argument to zarr.open_group.
    The next steps I'm following are

    1: Change ancestor storage to be ancestor_start, ancestor_end, ancestor_time, ancestor_focal_sites, and call_genotype, at the root of the zarr store. This, along with some extra metadata will let the file be read by sgkit.
    2: Check the size and perf of the resulting implementation.
    3: If all good implement in a backwards-compatible way.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions