Browse code

v.2.99.7

ramon diaz-uriarte (at Phelsuma) authored on 30/12/2020 15:01:49
Showing4 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: OncoSimulR
2 2
 Type: Package
3 3
 Title: Forward Genetic Simulation of Cancer Progression with Epistasis 
4
-Version: 2.99.6
4
+Version: 2.99.7
5 5
 Date: 2020-12-30
6 6
 Authors@R: c(
7 7
 	      person("Ramon", "Diaz-Uriarte", role = c("aut", "cre"),	
... ...
@@ -1,3 +1,6 @@
1
+Changes in version 2.99.7 (2020-12-30):
2
+	- Vignette: fixed two missing refs and add seed in two examples.
3
+
1 4
 Changes in version 2.99.6 (2020-12-30):
2 5
 	- No longer v.1 functionality.
3 6
 	- Slightly faster vignette.
... ...
@@ -458,8 +458,8 @@ This is a question that was addressed, for instance, in
458 458
 @Diaz-Uriarte2015: do methods that try to infer restrictions in the
459 459
 order of accumulation of mutations [e.g., @Szabo2008; @Gerstung2009;
460 460
 @ramazzotti_capri_2015] work well under different evolutionary
461
-models and with different sampling schemes? (This issue is also
462
-touched upon in section \@ref(sample-1)).
461
+models and with different sampling schemes?<!--  (This issue is also -->
462
+<!-- touched upon in section \@ref(sample-1)). -->
463 463
 
464 464
 A possible way to examine that question would involve:
465 465
 
... ...
@@ -1145,16 +1145,18 @@ plot(pancr)
1145 1145
 ``` 
1146 1146
 
1147 1147
 
1148
-```{r}
1148
+```{r theformerunnamed6}
1149 1149
 ## 2. Simulate from it. We change several possible options. 
1150 1150
 
1151
-set.seed(4) ## Fix the seed, so we can repeat it
1151
+set.seed(1) ## Fix the seed, so we can repeat it
1152
+## We set a small finalTime to speed up the vignette
1152 1153
 ep2 <- oncoSimulIndiv(pancr, model = "McFL",
1153 1154
                      mu = 1e-6,
1154 1155
                      sampleEvery = 0.02,
1155 1156
                      keepEvery = 1,
1156 1157
                      initSize = 1000,
1157
-                     finalTime = 10000,
1158
+                     finalTime = 20000,
1159
+                     detectionDrivers = 3,
1158 1160
                      onlyCancer = FALSE)
1159 1161
 ``` 
1160 1162
 
... ...
@@ -1164,9 +1166,9 @@ ep2 <- oncoSimulIndiv(pancr, model = "McFL",
1164 1166
 ##    to show only parts of the data. We also aggressively thin
1165 1167
 ##    the data.
1166 1168
 par(cex = 0.7)
1167
-plot(ep2, show = "genotypes", xlim = c(1000, 8000), 
1169
+plot(ep2, show = "genotypes", xlim = c(500, 1800), 
1168 1170
      ylim = c(0, 2400),
1169
-     thinData = TRUE, thinData.keep = 0.03)
1171
+     thinData = TRUE, thinData.keep = 0.3)
1170 1172
 ``` 
1171 1173
 
1172 1174
 
... ...
@@ -6347,6 +6349,13 @@ making mistakes).
6347 6349
 <!-- In v.1 you can only give the initial mutant as one with a single -->
6348 6350
 <!-- mutated gene. --> 
6349 6351
 
6352
+
6353
+```{r seedprbau003, echo=FALSE}
6354
+set.seed(2)
6355
+RNGkind("L'Ecuyer-CMRG")
6356
+```
6357
+
6358
+
6350 6359
 ```{r prbau003, fig.height=6}
6351 6360
 
6352 6361
 o3init <- allFitnessEffects(orderEffects = c(
... ...
@@ -6378,27 +6387,32 @@ plotClonePhylog(oneI, N = 0)
6378 6387
 
6379 6388
 
6380 6389
 
6381
-```{r hiddeprbau, echo=FALSE}
6382
-set.seed(3)
6383
-RNGkind("L'Ecuyer-CMRG")
6384
-```
6390
+<!-- ```{r hiddeprbau, echo=FALSE} -->
6391
+<!-- set.seed(3) -->
6392
+<!-- RNGkind("L'Ecuyer-CMRG") -->
6393
+<!-- ``` -->
6385 6394
 
6386 6395
 ```{r prbau003bb, fig.height=6}
6387 6396
 ## Note we also disable the stopping stochastically as a function of size
6388 6397
 ## to allow the population to grow large and generate may different
6389 6398
 ## clones.
6390 6399
 
6391
-## For speed, we set a small finalTime
6400
+## For speed, we set a small finalTime and we fix the seed
6401
+## for reproducilibity. Beware: since finalTime is short, sometimes
6402
+## we do not reach cancer 
6403
+set.seed(1)
6404
+RNGkind("L'Ecuyer-CMRG")
6392 6405
 
6393 6406
 ospI <- oncoSimulPop(2, 
6394 6407
                     o3init, model = "Exp",
6395
-                    mu = 5e-5, finalTime = 150,
6408
+                    mu = 5e-5, finalTime = 200,
6396 6409
                     detectionDrivers = 3,
6397 6410
                     onlyCancer = TRUE,
6398 6411
                     initSize = 10,
6399 6412
                     keepPhylog = TRUE,
6400 6413
                     initMutant = c("d > m > z"),
6401
-                    mc.cores = 2
6414
+                    mc.cores = 2,
6415
+                    seed = NULL
6402 6416
                     )
6403 6417
 
6404 6418
 ## Show just one example
... ...
@@ -6407,15 +6421,18 @@ plotClonePhylog(ospI[[1]])
6407 6421
 ## plotClonePhylog(ospI[[2]])
6408 6422
 ## par(op)
6409 6423
 
6424
+set.seed(1)
6425
+RNGkind("L'Ecuyer-CMRG")
6410 6426
 ossI <- oncoSimulSample(2, 
6411 6427
                         o3init, model = "Exp",
6412
-                        mu = 5e-5, finalTime = 150,
6428
+                        mu = 5e-5, finalTime = 200,
6413 6429
                         detectionDrivers = 2,
6414 6430
                         onlyCancer = TRUE,
6415 6431
                         initSize = 10,
6416 6432
                         initMutant = c("z > d"),
6417 6433
                         ## check presence of initMutant:
6418
-                        thresholdWhole = 1 
6434
+                        thresholdWhole = 1,
6435
+                        seed = NULL
6419 6436
                     )
6420 6437
 
6421 6438
 ## No phylogeny is kept with oncoSimulSample, but look at the 
... ...
@@ -13326,12 +13343,18 @@ There is  an example in Mather et al, p. 1234, section 3.1.1
13326 13343
 	 
13327 13344
 Of course, this only makes sense in models where birth rate changes.	 
13328 13345
 
13329
-## What can you do with the simulations?
13330 13346
 
13331
-This is up to you. In section \@ref(sample-1) we show an example
13332
-where we infer an Oncogenetic tree from simulated data and in
13333
-section \@ref(whatfor) we go over a varied set of scientific
13334
-questions where OncoSimulR could help.
13347
+<!-- FIXME: give references here -->
13348
+
13349
+<!-- ## What can you do with the simulations? -->
13350
+
13351
+<!-- This is up to you. We have used OncoSimulR extensively in several -->
13352
+<!-- papers and it has also been used by other authors -->
13353
+
13354
+<!-- <\!-- In section \@ref(sample-1) we show an example -\-> -->
13355
+<!-- <\!-- where we infer an Oncogenetic tree from simulated data and in -\-> -->
13356
+<!-- <\!-- section \@ref(whatfor) we go over a varied set of scientific -\-> -->
13357
+<!-- <\!-- questions where OncoSimulR could help. -\-> -->
13335 13358
 
13336 13359
 
13337 13360
 \clearpage
... ...
@@ -1,15 +1,15 @@
1 1
 \usepackage[%
2
-		shash={2ada86d},
3
-		lhash={2ada86d7f42bb61ac8759ba0540731c9ed6e2e2e},
2
+		shash={8d48397},
3
+		lhash={8d483972d4cd2e490ff8d718505afe7ec30443ce},
4 4
 		authname={ramon diaz-uriarte (at Phelsuma)},
5 5
 		authemail={rdiaz02@gmail.com},
6 6
 		authsdate={2020-12-30},
7
-		authidate={2020-12-30 00:28:25 +0100},
8
-		authudate={1609284505},
7
+		authidate={2020-12-30 01:45:46 +0100},
8
+		authudate={1609289146},
9 9
 		commname={ramon diaz-uriarte (at Phelsuma)},
10 10
 		commemail={rdiaz02@gmail.com},
11 11
 		commsdate={2020-12-30},
12
-		commidate={2020-12-30 00:28:25 +0100},
13
-		commudate={1609284505},
14
-		refnames={ (HEAD -> freq-dep-fitness-no-v1)}
12
+		commidate={2020-12-30 01:45:46 +0100},
13
+		commudate={1609289146},
14
+		refnames={ (HEAD -> freq-dep-fitness)}
15 15
 	]{gitsetinfo}
16 16
\ No newline at end of file