Skip to content

write method to emit SLiM reload script #60

Open

Description

@petrelharp

One can reload a tree sequence into SLiM, but only if one knows some information like length of the genome, etcetera (need to check what, exactly?). It would be handy if pyslim could produce a very simple SLiM script that would, basically, just reload the simulation, so that it could be inspected in the console, and things could be printed, from SLiM.

Activity

  1. petrelharp commented on Jan 28, 2020

    @petrelharp
    ContributorAuthor

    This sufficies:

    initialize() {
        // need WF/nonWF
        initializeTreeSeq();
       // do we need mutation types?
        initializeMutationType("m1", 0.5, "f", 0.0);
        m1.convertToSubstitution = F;
        initializeGenomicElementType("g1", m1, 1.0);
        initializeGenomicElement(g1, 0, 9999);
        initializeMutationRate(0.0);
        initializeRecombinationRate(0.0);
    }
    // should be early() or late()?
    1 early() {
        sim.readFromPopulationFile(RESTART_FROM);
        catn("Number of individuals: " + p1.individualCount + " in generation " + sim.generation);
    }
    
  2. added this to the v1.1 milestone on Aug 11, 2022
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions