Skip to content

Genome_units attribute or metadata #2649

Closed as not planned
Closed as not planned

Description

@hyanwong

We currently have a time_units top-level attribute. In #495 (comment) @petrelharp argues for storing the genomic units too (presumably usually "basepairs" or "bp", unless you are running msprime.simulate. In that issue there is also discussion about whether this should be metadata or an attribute: the general idea is that if tskit uses it internally, it shouldn't be metadata. Another problem with metadata is that is is not accessible easily from C.

One trivial use of a genome_units value would be in visualisation, allowing us to label the x axis on a plot correctly (and express it in kb or Mb, see #2345). I don't know if this is a strong enough argument to make it a top-level attribute?

Activity

  1. benjeffery commented on Nov 25, 2022

    @benjeffery
    Member

    Are there stats methods that would use this to error/warn if the dimension wasn't correct? Such as with time_units?

  2. hyanwong commented on Nov 25, 2022

    @hyanwong
    MemberAuthor

    I can't think of any at the moment. But if we ever wanted to use the tree sequence format to store a set of correlated trees that weren't along a genome, but simply e.g. a set of MCMC outputs, then I guess this might be useful.

    It would be helpful, perhaps, if we have a reference sequence, to check that the units of the original tree sequence are "base pairs". Similarly, if we are comparing 2 tree sequences, e.g. with ts.coiterate(), it would be sensible to check that the position units are the same between the two tree sequences being compared.

  3. hyanwong commented on Nov 25, 2022

    @hyanwong
    MemberAuthor

    Oh, also, if a RateMap object knew what its internal units were, it could check them against the tree sequence genome_units before applying the rate. But that's a further elaboration which might be a step too far.

  4. jeromekelleher commented on Nov 28, 2022

    @jeromekelleher
    Member

    I don't think we have a strong enough use-case at the moment to justify doing the actual work here. I agree it's a nice to have, but I think you can basically assume things are in units of basepairs at the moment.

  5. added
    future
    on Nov 28, 2022
  6. benjeffery commented on Nov 28, 2022

    @benjeffery
    Member

    I've added the "future" label, closing for now.

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

    future

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions