Closed bodkan closed 1 month ago
Attention: Patch coverage is 90.41096%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 90.65%. Comparing base (
6a1f090
) to head (3a55cbe
). Report is 33 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
R/slim.R | 75.86% | 7 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Draft of the update for the NEWS file of what will eventually become v1.0.
The behavior previously implemented via the
output =
andts =
arguments ofslim()
(andmsprime()
) has been changed to facilitate more straightforward handling of output paths in user-defined SLiM extensions and other packages leveraging slendr for inference. This represents a breaking change in user interfaces of bothslim()
andmsprime()
functions:slim()
: thets
argument is now logical.TRUE
switches on tree-sequence recording,FALSE
switches it off. If tree-sequence recording is on, the function automatically returns a tree-sequence R object. If users want to save it to a custom location, they should use the functionts_save()
. If customized output files are to be simulated via user-defined extension scripts, those scripts can use a SLiM constantPATH
, which can be set viaslim(..., path = <path to a directory>)
from R and is then automatically passed over to SLiM. This way, user-defined scripts don't have to deal with path management manually, but can specify output directory in R. In these case, theslim()
function always returns that path back. If the path is set,slim()
will not return a tree sequence object, but that object can be loaded byts_load("<path to a directory>/slim.trees")
. In other words, nothing changes for the usual SLiM-based slendr workflow, but for models generating custom output files, a small amount of work is needed to load the tree sequence -- the tree-sequence file outputs are therefore treated exactly the same way as non-tree-sequence user-defined output files. This function also no longer accepts aload = TRUE|FALSE
argument for this exact reason.msprime()
: Because customization of user outputs is only supported for SLiM models,msprime()
still only ever simulates a tree sequence. Having a dedicated option to specify the path to a tree-sequence file is therefore redundant and when needed, tree sequences can be saved via thets_save()
function. This function also no longer accepts aload = TRUE|FALSE
argument for this exact reason. The function also always simulates a tree sequence in memory, it never runs msprime on the command line in the background, regardless of whether a slendr model has been serialized or not.