Skip to content

Generating ms-output from tree sequence #727

Closed

Description

@SBNoor

I have tree sequence recording from SLiM. Is there a way in msprime to generate the MS output directly from msprime?

Activity

  1. jeromekelleher commented on May 20, 2019

    @jeromekelleher
    Member

    This isn't something that we support in msprime, but there is a new tsconvert repo in development which is intended to do all of these types of conversions between formats. Unfortunately tsconvert hasn't been released and is pretty incomplete. There is a ts_ms function which might be useful to you though.

  2. bhaller commented on Jul 20, 2020

    @bhaller

    Hi @jeromekelleher. Regarding the answer above, I see the last commit to tsconvert was 17 months ago; is it still considered an active project or has it been abandoned? I just got another SLiM user today who wants to get MS output from a tree sequence; this comes up with some regularity. This would really not be hard to add to the Python APIs, would it? It's a very simple format; it'd be nice to have a better solution for this.

  3. jeromekelleher commented on Jul 20, 2020

    @jeromekelleher
    Member

    Yeah, this is a pretty simple thing to do and we should just do it in tskit. I guess we can just thrown an error if we hit a situation where ms-format doesn't make sense.

    We haven't abandoned tsconvert, as such, just nobody has done any work on it! ;)

  4. jeromekelleher commented on Jul 20, 2020

    @jeromekelleher
    Member

    Ah, this is a tskit issue. Moving it over there.

  5. added this to the Python 0.3.0 milestone on Jul 20, 2020
  6. jeromekelleher commented on Jul 20, 2020

    @jeromekelleher
    Member

    Putting it into 0.3.0 for now, but we can push back to 0.3.1 if needs be.

  7. yunusbb commented on Aug 8, 2020

    @yunusbb

    Ability to output in ms format is very much anticipated function. This can make tons of old scripts and pipelines usable. Would be great if someone can add this ms-format output?

  8. saurabhbelsare commented on Aug 19, 2020

    @saurabhbelsare
    Contributor

    Hi,
    I'm working on a function to write out ms format output from tree sequence, creating a function similar to the existing write_vcf function. Hope this approach is fine.

  9. jeromekelleher commented on Aug 19, 2020

    @jeromekelleher
    Member

    That would be excellent, thanks @saurabhbelsare!

  10. yunusbb commented on Aug 19, 2020

    @yunusbb

    That would be a really useful function, thanks Saurabh!

  11. petrelharp commented on Sep 18, 2020

    @petrelharp
    Contributor

    Say, @yunusbb and @SBNoor - @saurabhbelsare is working on this over in #854, and we'd like to make sure this would do what you need for your pipelines. Care to elaborate what sort of ms format you use? e.g. do you get the newick trees (with -T)? is num_replicates > 1?

  12. added
    enhancement
    Python API
    on Sep 29, 2020
  13. benjeffery commented on Jun 5, 2025

    @benjeffery
    Member

    Closing this as the method exists and #1464 exists to track documenting/moving the code.

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

    Python APIenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions