tskit-dev / pyslim

Tools for dealing with tree sequences coming to and from SLiM.
MIT License
27 stars 23 forks source link

`modelType` has moved to community #252

Closed petrelharp closed 2 years ago

petrelharp commented 2 years ago

Scripts containing sim.modelType raise this error:

ERROR (EidosValue_Object_singleton::GetPropertyOfElements): property modelType is not defined for object element type Species.

... which could be autocorrected to community.modelType by SLiMgui, but isn't.

MWE:

initialize() {
    initializeMutationRate(1e-7);
    initializeMutationType("m1", 0.5, "f", 0.0);
    initializeGenomicElementType("g1", m1, 1.0);
    initializeGenomicElement(g1, 0, 99999);
    initializeRecombinationRate(1e-8);
}

1 early() {
    sim.addSubpop("p1", 500);
    catn(sim.modelType);
}

1000 late() { p1.outputSample(10); }
petrelharp commented 2 years ago

Whoops - this was supposed to be in SLiM.