diff --git a/docs/articles/vignette-00-installation.html b/docs/articles/vignette-00-installation.html index b8ff8e9d6..6f4e7b5c1 100644 --- a/docs/articles/vignette-00-installation.html +++ b/docs/articles/vignette-00-installation.html @@ -256,6 +256,80 @@
Note that slendr requires SLiM 4.0 and will not work with an
earlier version. Again, running library(slendr)
will inform
you of any potential issues with your SLiM installation.
$PATH
+In order for slendr to be able to find your SLiM
+installation, R must be able to find the slim
binary (or
+slim.exe
in case of Windows) in the so called $PATH
+variable. The easiest way to verify that this is true is to call
+Sys.which("slim")
(or Sys.which("slim.exe")
on
+Windows) in your R session. For instance, on my own Mac, I get this:
> Sys.which("slim")
+ slim
+"/usr/local/bin/slim"
+On Windows, I get this (I followed the section 2.3.1 of the SLiM +manual describing the most “official” way to install SLiM and I +recommend you follow this as well):
+> Sys.which("slim.exe")
+ slim.exe
+"C:\\msys64\\mingw64\\bin\\slim.exe"
+If, on the other hand, you might get something like this — an empty +string:
+> Sys.which("slim")
+slim
+ ""
+This means that your $PATH
R is not configured
+properly and R (and slendr) won’t be able to find SLiM in the
+$PATH
.
How to add SLiM to the $PATH
then? Probably the most
+convenient way to do this is by editing the .Renviron
file.
+The precise location of this file depends on your operation system but
+you can automatically get it open in a text editor by using this command
+(you might have to do install.packages("usethis")
+first):
usethis::edit_r_environ()
+Then, you can either add the following (note that there’s no
+$
in this line!):
PATH="<path to directory with SLiM binaries>"
+Alternatively, should you already have some $PATH
+contents specified for your R session, you can get it by calling
+Sys.getenv("PATH")
in your R console, grab the entire
+string you get in this way, and append the path where you installed SLiM
+using an appropriate delimiter (:
on Linux/macOS,
+;
on Windows) to this string. In this case, the edit might
+look something like this:
PATH="<original Sys.getenv("PATH") content><delimiter><path to directory with SLiM binaries>"
+For instance, on my Mac, the .Renviron
file contains
+this line (note the last item /usr/local/bin
matches the
+path to slim
I showed above):
PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/Users/mp/.my_local/bin:/Users/mp/.my_local/AdmixTools/bin:/Library/TeX/texbin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/usr/local/bin"
+On my testing Windows machine, I have this in the
+.Renviron
file (again, look for the path
+C:/msys64/mingw64/bin;$PATH"
which matches the
+slim.exe
binary shown above):
PATH="C:\\msys64\\usr\\bin;C:\\rtools43\\x86_64-w64-mingw32.static.posix\\bin;C:\\rtools43\\usr\\bin;C:\\Program Files (x86)\\R\\R-4.3.2\\bin\\x64;C:/msys64/mingw64/bin"
+The most important check that your R can find SLiM is using
+the Sys.which()
command described above. Before this gives
+you a positive result, you won’t be able to use slendr’s
+spatial SLiM simulations. If you’re struggling with this,
+search for advice related to .Renviron
and
+$PATH
online.
If you don’t want to deal with editing the .Renviron
+file, you should be able to set the path to SLiM using the command
+Sys.setenv(PATH = "<path to directory with SLiM binaries>")
.
+You will have to do this at the beginning of each of your slendr R
+scripts though.
Alternatively, the slim()
function has an argument
+slim_path=
where you can specify the full path to the
+slim
or slim.exe
binaries directly (not the
+directory as it’s the case with the $PATH
! the full path to
+the slim
/slim.exe
binary itself).
#> ╔═══════════════════════╗
#> ║TreeSequence ║
#> ╠═══════════════╤═══════╣
-#> ║Trees │ 130║
+#> ║Trees │ 133║
#> ╟───────────────┼───────╢
#> ║Sequence Length│ 100000║
#> ╟───────────────┼───────╢
@@ -788,15 +788,15 @@ Running the simulation#> ╔═══════════╤═════╤═════════╤════════════╗
#> ║Table │Rows │Size │Has Metadata║
#> ╠═══════════╪═════╪═════════╪════════════╣
-#> ║Edges │18739│585.6 KiB│ No║
+#> ║Edges │18682│583.8 KiB│ No║
#> ╟───────────┼─────┼─────────┼────────────╢
-#> ║Individuals│12841│ 1.2 MiB│ Yes║
+#> ║Individuals│12838│ 1.2 MiB│ Yes║
#> ╟───────────┼─────┼─────────┼────────────╢
#> ║Migrations │ 0│ 8 Bytes│ No║
#> ╟───────────┼─────┼─────────┼────────────╢
#> ║Mutations │ 0│ 1.2 KiB│ No║
#> ╟───────────┼─────┼─────────┼────────────╢
-#> ║Nodes │18380│682.7 KiB│ Yes║
+#> ║Nodes │18332│681.0 KiB│ Yes║
#> ╟───────────┼─────┼─────────┼────────────╢
#> ║Populations│ 6│ 2.6 KiB│ Yes║
#> ╟───────────┼─────┼─────────┼────────────╢
diff --git a/docs/articles/vignette-02-grid-model.html b/docs/articles/vignette-02-grid-model.html
index 376f5bf07..8d7517ca6 100644
--- a/docs/articles/vignette-02-grid-model.html
+++ b/docs/articles/vignette-02-grid-model.html
@@ -284,15 +284,15 @@ Simple two-dimensional grid model#> ╔═══════════╤════╤═════════╤════════════╗
#> ║Table │Rows│Size │Has Metadata║
#> ╠═══════════╪════╪═════════╪════════════╣
-#> ║Edges │9042│282.6 KiB│ No║
+#> ║Edges │9065│283.3 KiB│ No║
#> ╟───────────┼────┼─────────┼────────────╢
-#> ║Individuals│6310│617.8 KiB│ Yes║
+#> ║Individuals│6316│618.4 KiB│ Yes║
#> ╟───────────┼────┼─────────┼────────────╢
#> ║Migrations │ 0│ 8 Bytes│ No║
#> ╟───────────┼────┼─────────┼────────────╢
#> ║Mutations │ 0│ 1.2 KiB│ No║
#> ╟───────────┼────┼─────────┼────────────╢
-#> ║Nodes │9068│337.2 KiB│ Yes║
+#> ║Nodes │9090│338.0 KiB│ Yes║
#> ╟───────────┼────┼─────────┼────────────╢
#> ║Populations│ 25│ 5.7 KiB│ Yes║
#> ╟───────────┼────┼─────────┼────────────╢
@@ -382,7 +382,7 @@ More customized spatial modelmap <- world(xrange = xrange, yrange = yrange, crs = "EPSG:31970")
#> Reading layer `ne_110m_land' from data source
-#> `/private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/Rtmpug1qnH/naturalearth/ne_110m_land.shp'
+#> `/private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/RtmpI0CWYj/naturalearth/ne_110m_land.shp'
#> using driver `ESRI Shapefile'
#> Simple feature collection with 127 features and 3 fields
#> Geometry type: POLYGON
diff --git a/docs/articles/vignette-05-tree-sequences.html b/docs/articles/vignette-05-tree-sequences.html
index a57b01438..7879b8064 100644
--- a/docs/articles/vignette-05-tree-sequences.html
+++ b/docs/articles/vignette-05-tree-sequences.html
@@ -340,11 +340,11 @@ Scheduling of sampling events#> --------------------------------------------------
#> msprime command:
#>
-#> /Users/mp/Library/r-miniconda-arm64/envs/Python-3.12_msprime-1.3.0_tskit-0.5.6_pyslim-1.0.4_tspop-0.0.2/bin/python /private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/RtmpYADxQ3/file122e5348d0ae_introgression/script.py --seed 314159 --model /private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/RtmpYADxQ3/file122e5348d0ae_introgression --output /var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpYADxQ3/file122e57375f75f.trees --sequence-length 100000000 --recombination-rate 1e-08 --sampling-schedule /var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpYADxQ3/file122e550be251a --verbose
+#> /Users/mp/Library/r-miniconda-arm64/envs/Python-3.12_msprime-1.3.0_tskit-0.5.6_pyslim-1.0.4_tspop-0.0.2/bin/python /private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/RtmpQbon7e/filee17860409253_introgression/script.py --seed 314159 --model /private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/RtmpQbon7e/filee17860409253_introgression --output /var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpQbon7e/filee1784cccb6b3.trees --sequence-length 100000000 --recombination-rate 1e-08 --sampling-schedule /var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpQbon7e/filee17859cbb4d3 --verbose
#> --------------------------------------------------
#>
#> Tree sequence was saved to:
-#> /var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpYADxQ3/file122e57375f75f.trees
+#> /var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpQbon7e/filee1784cccb6b3.trees
#> Loading the tree-sequence file...
ts
#> [1] "/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpYADxQ3/file122e534b363bf"
+#> [1] "/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpQbon7e/filee17821d8acf8"
In case have the tree-sequence output saved in a custom location on
disk, we can load the tree sequence using the slendr function
ts_load()
. If we’re dealing with a tree sequence produced
diff --git a/docs/articles/vignette-08-nonslendr-tskit.html b/docs/articles/vignette-08-nonslendr-tskit.html
index 5735d5b1e..c2da2a340 100644
--- a/docs/articles/vignette-08-nonslendr-tskit.html
+++ b/docs/articles/vignette-08-nonslendr-tskit.html
@@ -189,7 +189,7 @@
After we run this script in SLiM, we can use slendr to load the output tree sequence (saved to @@ -315,7 +315,7 @@
library(ape)
plot(tree, show.tip.label = FALSE)
@@ -394,7 +394,7 @@ Spatial SLiM (non-slendr) tree s
}
10000 late() {
- sim.treeSeqOutput("/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//RtmpZrPslt/file12655786f22f");
+ sim.treeSeqOutput("/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T//Rtmpx99kMg/filee61c27e4c5b7");
}
We can then load and simplify the output tree sequence in just as we did above in this vignette (or anywhere in the slendr @@ -436,7 +436,7 @@
We can also collect spatio-temporal ancestry information of a particular node (i.e. the times and locations of all of its ancestors all the way to the root, with each “link” in the plot signifying @@ -452,7 +452,7 @@
map <- world(xrange = c(-13, 70), yrange = c(18, 65), crs = 3035)
#> Reading layer `ne_110m_land' from data source
-#> `/private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/Rtmp6dsC0I/naturalearth/ne_110m_land.shp'
+#> `/private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/RtmpdblWjc/naturalearth/ne_110m_land.shp'
#> using driver `ESRI Shapefile'
#> Simple feature collection with 127 features and 3 fields
#> Geometry type: POLYGON
@@ -395,7 +395,7 @@ Script from panel A
map <- world(xrange = c(-13, 70), yrange = c(18, 65), crs = 3035)
#> Reading layer `ne_110m_land' from data source
-#> `/private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/Rtmp6dsC0I/naturalearth/ne_110m_land.shp'
+#> `/private/var/folders/70/b_q2zdh116b9pfg29p03sx600000gn/T/RtmpdblWjc/naturalearth/ne_110m_land.shp'
#> using driver `ESRI Shapefile'
#> Simple feature collection with 127 features and 3 fields
#> Geometry type: POLYGON
@@ -638,22 +638,22 @@ Run time of each code exam
ex1
-5.919463
+9.1276798
mins
ex2
-11.885701
+13.1026733
mins
ex3
-2.055744
+2.2592016
mins
ex4
-0.560190
+0.6743221
secs
diff --git a/docs/articles/vignette-10-tracts.html b/docs/articles/vignette-10-tracts.html
index d22a2f239..bee61b142 100644
--- a/docs/articles/vignette-10-tracts.html
+++ b/docs/articles/vignette-10-tracts.html
@@ -295,7 +295,7 @@ “Chromosome painting” of anc
ggtitle("True ancestry tracts along each chromosome") +
theme(axis.text.y = element_blank(), panel.grid = element_blank()) +
facet_grid(pop ~ ., scales = "free_y")
By lining up NEA & DEN ancestry tracts in both EUR and PAP populations, we can see how the common origin of Neanderthal ancestry in both non-African populations manifests in a significant overlap of NEA diff --git a/docs/articles/vignette-10-tracts_files/figure-html/chrom_painting-1.png b/docs/articles/vignette-10-tracts_files/figure-html/chrom_painting-1.png index 62cfdd724..e13acadbd 100644 Binary files a/docs/articles/vignette-10-tracts_files/figure-html/chrom_painting-1.png and b/docs/articles/vignette-10-tracts_files/figure-html/chrom_painting-1.png differ diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 38e581aef..e269d68ec 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: 3.1.1 +pandoc: 3.1.11.1 pkgdown: 2.0.7 pkgdown_sha: ~ articles: @@ -13,7 +13,7 @@ articles: vignette-08-nonslendr-tskit: vignette-08-nonslendr-tskit.html vignette-09-paper: vignette-09-paper.html vignette-10-tracts: vignette-10-tracts.html -last_built: 2024-02-06T15:16Z +last_built: 2024-02-07T09:51Z urls: reference: https://www.slendr.net/reference article: https://www.slendr.net/articles diff --git a/docs/reference/join.html b/docs/reference/join.html index bd1705ac1..609058a4c 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -133,7 +133,7 @@