Skip to content

from_ms should do something useful with replicates #31

@grahamgower

Description

@grahamgower

Currently, from_ms() just converts the first replicate. It might be nice to instead return an iterator over the tree sequences, like when one calls msprime.simulate() with num_replicates>1.

$ mspms 3 2 -T -r 5 6 -seeds 1 2 3
/home/grg/.local/bin/mspms 3 2 -T -r 5 6 -seeds 1 2 3
1 2 3

//
[1](3:0.620,(1:0.150,2:0.150):0.470);
[1](3:2.573,(1:0.150,2:0.150):2.423);
[1](3:0.910,(1:0.150,2:0.150):0.760);
[3](3:0.702,(1:0.150,2:0.150):0.552);

//
[1](1:1.195,(2:0.220,3:0.220):0.975);
[1](1:1.791,(2:0.220,3:0.220):1.572);
[1](1:1.205,(2:0.220,3:0.220):0.986);
[1](2:1.205,(1:0.555,3:0.555):0.651);
[1](2:0.621,(1:0.555,3:0.555):0.066);
[1](1:0.555,(2:0.518,3:0.518):0.036);
$ mspms 3 2 -T -r 5 6 -seeds 1 2 3 | python -c "import tsconvert, sys; ts =
tsconvert.from_ms(sys.stdin.read()); print(ts.num_trees)"
4

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions