Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bodkan committed Oct 9, 2024
1 parent b19fccc commit ba7c6e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- The behavior previously implemented via the `output =` and `ts =` arguments of `slim()` (and `msprime()`) has been changed to facilitate more straightforward handling of output paths in user-defined SLiM extensions and other packages leveraging _slendr_ for inference. The `slim()` and `msprime()` function interfaces are now simplified in the following way:

- `slim()`: the `ts` 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 function `ts_save()` on the returned tree-sequence object. If customized output files are to be produced via user-defined extension scripts, those scripts can use a _slendr_/SLiM constant `PATH`, which is always available in the built-in SLiM script and which can be set from R via `slim(..., path = <path to a directory>)`. In that case, the `slim()` function always returns that path back. Crucially, in this case `slim()` will not return a tree sequence object, but that object can be loaded by `ts_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. As a result of these changes, `slim()` no longer accepts a `load = TRUE|FALSE` argument.
- `slim()`: the `ts` argument is now logical. `TRUE` switches on tree-sequence recording, `FALSE` switches it off. If tree-sequence recording is on (the default setting), the function automatically returns a tree-sequence R object. If users want to save it to a custom location, they should use the function `ts_save()` on the returned tree-sequence object. If customized output files are to be produced via user-defined extension scripts, those scripts can use a _slendr_/SLiM constant `PATH`, which is always available in the built-in SLiM script and which can be set from R via `slim(..., path = <path to a directory>)`. In that case, the `slim()` function always returns that path back. Crucially, in this case `slim()` will not return a tree sequence object, but that object can be loaded by `ts_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. As a result of these changes, `slim()` no longer accepts a `load = TRUE|FALSE` argument.

The above is implemented in PR [#157](https://github.com/bodkan/slendr/pull/157).

Expand Down
2 changes: 1 addition & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/reference/slim.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba7c6e8

Please sign in to comment.