Browse code

v.2.99.6: no v.1, slightly faster vignette

ramon diaz-uriarte (at Phelsuma) authored on 30/12/2020 00:39:06
Showing1 changed files

... ...
@@ -569,9 +569,17 @@ So we will use `fixation`.
569 569
 ```{r exochsb}
570 570
 ## Set a small initSize, as o.w. unlikely to pass the valley
571 571
 initS <- 10
572
-## The number of replicates is tiny, 10, for the sake of speed
573
-## of creation of the vignette
574
-od_sim <- oncoSimulPop(10, od, muEF = odm,
572
+## The number of replicates is tiny, for the sake of speed
573
+## of creation of the vignette. Even fewer in Windows, since we run on a single
574
+## core
575
+
576
+if(.Platform$OS.type == "windows") {
577
+    nruns <- 4
578
+} else {
579
+    nruns <- 10
580
+}
581
+
582
+od_sim <- oncoSimulPop(nruns, od, muEF = odm,
575 583
                        fixation = c("u", "i, v"), initSize = initS,
576 584
                        model = "McFL",
577 585
                        mu = 1e-4, detectionDrivers = NA, 
... ...
@@ -6358,7 +6366,7 @@ o3init <- allFitnessEffects(orderEffects = c(
6358 6366
                               "D" = "d") )
6359 6367
 
6360 6368
 oneI <- oncoSimulIndiv(o3init, model = "McFL",
6361
-                       mu = 5e-5, finalTime = 500,
6369
+                       mu = 5e-5, finalTime = 200,
6362 6370
                        detectionDrivers = 3,
6363 6371
                        onlyCancer = FALSE,
6364 6372
                        initSize = 1000,
... ...
@@ -6369,13 +6377,22 @@ plotClonePhylog(oneI, N = 0)
6369 6377
 ```
6370 6378
 
6371 6379
 
6380
+
6381
+```{r hiddeprbau, echo=FALSE}
6382
+set.seed(3)
6383
+RNGkind("L'Ecuyer-CMRG")
6384
+```
6385
+
6372 6386
 ```{r prbau003bb, fig.height=6}
6373 6387
 ## Note we also disable the stopping stochastically as a function of size
6374 6388
 ## to allow the population to grow large and generate may different
6375 6389
 ## clones.
6390
+
6391
+## For speed, we set a small finalTime
6392
+
6376 6393
 ospI <- oncoSimulPop(2, 
6377 6394
                     o3init, model = "Exp",
6378
-                    mu = 5e-5, finalTime = 500,
6395
+                    mu = 5e-5, finalTime = 150,
6379 6396
                     detectionDrivers = 3,
6380 6397
                     onlyCancer = TRUE,
6381 6398
                     initSize = 10,
... ...
@@ -6392,7 +6409,7 @@ plotClonePhylog(ospI[[1]])
6392 6409
 
6393 6410
 ossI <- oncoSimulSample(2, 
6394 6411
                         o3init, model = "Exp",
6395
-                        mu = 5e-5, finalTime = 500,
6412
+                        mu = 5e-5, finalTime = 150,
6396 6413
                         detectionDrivers = 2,
6397 6414
                         onlyCancer = TRUE,
6398 6415
                         initSize = 10,
... ...
@@ -6690,8 +6707,16 @@ the sake of speed when creating the vignette).
6690 6707
 ```{r simul-ochs}
6691 6708
 initS <- 20
6692 6709
 ## We use only a small number of repetitions for the sake
6693
-## of speed.
6694
-od100 <- oncoSimulPop(10, od2,
6710
+## of speed. Even fewer in Windows, since we run on a single
6711
+## core
6712
+
6713
+if(.Platform$OS.type == "windows") {
6714
+    nruns <- 4
6715
+} else {
6716
+    nruns <- 10
6717
+}
6718
+
6719
+od100 <- oncoSimulPop(nruns, od2,
6695 6720
                       fixation = c("u", "v, i"),
6696 6721
                       model = "McFL",
6697 6722
                       mu = 1e-4,
... ...
@@ -9588,7 +9613,7 @@ set.seed(1)
9588 9613
 tmp3 <- oncoSimulIndiv(afear3, 
9589 9614
                        model = "McFL", 
9590 9615
                        onlyCancer = FALSE, 
9591
-                       finalTime = 100,
9616
+                       finalTime = 60,
9592 9617
                        mu = 1e-4,
9593 9618
                        initSize = 5000, 
9594 9619
                        keepPhylog = FALSE,
... ...
@@ -9619,7 +9644,7 @@ set.seed(1)
9619 9644
 s1fd <- oncoSimulIndiv(afe4, 
9620 9645
                      model = "McFL", 
9621 9646
                      onlyCancer = FALSE, 
9622
-                     finalTime = 50,
9647
+                     finalTime = 40,
9623 9648
                      mu = 1e-4,
9624 9649
                      initSize = 5000, 
9625 9650
                      keepPhylog = TRUE,
... ...
@@ -9636,7 +9661,7 @@ s2fd <- oncoSimulIndiv(afe4,
9636 9661
                      muEF = mtfd,
9637 9662
                      model = "McFL", 
9638 9663
                      onlyCancer = FALSE, 
9639
-                     finalTime = 50,
9664
+                     finalTime = 40,
9640 9665
                      mu = 1e-4,
9641 9666
                      initSize = 5000, 
9642 9667
                      keepPhylog = TRUE,
... ...
@@ -13560,6 +13585,8 @@ This is the information about the version of R and packages used:
13560 13585
 sessionInfo()
13561 13586
 ``` 
13562 13587
 
13588
+<!-- FIXME: rm once we are done with the timeouts -->
13589
+
13563 13590
 ## Time it takes to build the vignette and most time consuming chunks
13564 13591
 
13565 13592
 Time to build the vignette: