git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/OncoSimulR@120459 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -1,8 +1,8 @@ |
1 | 1 |
Package: OncoSimulR |
2 | 2 |
Type: Package |
3 | 3 |
Title: Forward Genetic Simulation of Cancer Progresion with Epistasis |
4 |
-Version: 2.3.13 |
|
5 |
-Date: 2016-08-19 |
|
4 |
+Version: 2.3.14 |
|
5 |
+Date: 2016-08-26 |
|
6 | 6 |
Authors@R: c(person("Ramon", "Diaz-Uriarte", role = c("aut", "cre"), |
7 | 7 |
email = "rdiaz02@gmail.com"), |
8 | 8 |
person("Mark", "Taylor", role = "ctb", email = "ningkiling@gmail.com")) |
... | ... |
@@ -872,7 +872,7 @@ test_that("Mutator, several modules differences", { |
872 | 872 |
max.tries <- 4 |
873 | 873 |
for(tries in 1:max.tries) { |
874 | 874 |
cat("\n mmdSM1: a runif is", runif(1), "\n") |
875 |
- reps <- 25 |
|
875 |
+ reps <- 60 |
|
876 | 876 |
no <- 5e3 |
877 | 877 |
ft <- 50 ## you need it large enough to get enough hits |
878 | 878 |
mu <- 1e-5 |
... | ... |
@@ -940,6 +940,10 @@ test_that("Mutator, several modules differences", { |
940 | 940 |
T1 <- ( wilcox.test(summary(b2)$NumClones, |
941 | 941 |
summary(b1)$NumClones, alternative = "greater")$p.value < p.value.threshold) |
942 | 942 |
T2 <- (t.test(mutsPerClone(b2), mutsPerClone(b1), alternative = "greater")$p.value < p.value.threshold) |
943 |
+ ## it very rarely fails; what are the p-values? |
|
944 |
+ print(suppressWarnings(wilcox.test(summary(b2)$NumClones, |
|
945 |
+ summary(b1)$NumClones, alternative = "greater")$p.value)) |
|
946 |
+ print(suppressWarnings(t.test(mutsPerClone(b2), mutsPerClone(b1), alternative = "greater")$p.value)) |
|
943 | 947 |
if( T1 && T2 ) break; |
944 | 948 |
} |
945 | 949 |
cat(paste ("\n done tries ", tries, "\n")) |
... | ... |
@@ -6,7 +6,7 @@ test_that("Increasing cPDetect decreases time" , { |
6 | 6 |
gi <- rep(0.1, 10) |
7 | 7 |
names(gi) <- letters[1:10] |
8 | 8 |
oi <- allFitnessEffects(noIntGenes = gi) |
9 |
- n <- 55 |
|
9 |
+ n <- 75 |
|
10 | 10 |
max.tries <- 4 |
11 | 11 |
for(tries in 1:max.tries) { |
12 | 12 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -42,7 +42,7 @@ test_that("Increasing p2 decreases time" , { |
42 | 42 |
gi <- rep(0.1, 10) |
43 | 43 |
names(gi) <- letters[1:10] |
44 | 44 |
oi <- allFitnessEffects(noIntGenes = gi) |
45 |
- n <- 55 |
|
45 |
+ n <- 75 |
|
46 | 46 |
max.tries <- 4 |
47 | 47 |
for(tries in 1:max.tries) { |
48 | 48 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -79,7 +79,7 @@ test_that("Increasing n2 increases time" , { |
79 | 79 |
gi <- rep(0.1, 10) |
80 | 80 |
names(gi) <- letters[1:10] |
81 | 81 |
oi <- allFitnessEffects(noIntGenes = gi) |
82 |
- n <- 50 |
|
82 |
+ n <- 70 |
|
83 | 83 |
max.tries <- 4 |
84 | 84 |
for(tries in 1:max.tries) { |
85 | 85 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -117,7 +117,7 @@ test_that("Increasing checkSizePEvery increases time" , { |
117 | 117 |
gi <- rep(0.1, 10) |
118 | 118 |
names(gi) <- letters[1:10] |
119 | 119 |
oi <- allFitnessEffects(noIntGenes = gi) |
120 |
- n <- 50 |
|
120 |
+ n <- 70 |
|
121 | 121 |
max.tries <- 4 |
122 | 122 |
for(tries in 1:max.tries) { |
123 | 123 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -157,7 +157,7 @@ test_that("Increasing cPDetect decreases time, Exp" , { |
157 | 157 |
gi <- rep(0.1, 10) |
158 | 158 |
names(gi) <- letters[1:10] |
159 | 159 |
oi <- allFitnessEffects(noIntGenes = gi) |
160 |
- n <- 50 |
|
160 |
+ n <- 70 |
|
161 | 161 |
max.tries <- 4 |
162 | 162 |
for(tries in 1:max.tries) { |
163 | 163 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -193,7 +193,7 @@ test_that("Increasing p2 decreases time, Exp" , { |
193 | 193 |
gi <- rep(0.1, 10) |
194 | 194 |
names(gi) <- letters[1:10] |
195 | 195 |
oi <- allFitnessEffects(noIntGenes = gi) |
196 |
- n <- 60 |
|
196 |
+ n <- 150 |
|
197 | 197 |
max.tries <- 4 |
198 | 198 |
for(tries in 1:max.tries) { |
199 | 199 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -230,7 +230,7 @@ test_that("Increasing n2 increases time, Exp" , { |
230 | 230 |
gi <- rep(0.1, 10) |
231 | 231 |
names(gi) <- letters[1:10] |
232 | 232 |
oi <- allFitnessEffects(noIntGenes = gi) |
233 |
- n <- 60 |
|
233 |
+ n <- 70 |
|
234 | 234 |
max.tries <- 4 |
235 | 235 |
for(tries in 1:max.tries) { |
236 | 236 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -268,7 +268,7 @@ test_that("Increasing checkSizePEvery increases time, Exp" , { |
268 | 268 |
gi <- rep(0.1, 10) |
269 | 269 |
names(gi) <- letters[1:10] |
270 | 270 |
oi <- allFitnessEffects(noIntGenes = gi) |
271 |
- n <- 60 |
|
271 |
+ n <- 70 |
|
272 | 272 |
max.tries <- 4 |
273 | 273 |
for(tries in 1:max.tries) { |
274 | 274 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -312,7 +312,7 @@ test_that("Increasing cPDetect decreases time" , { |
312 | 312 |
gi <- rep(0.0, 10) |
313 | 313 |
names(gi) <- letters[1:10] |
314 | 314 |
oi <- allFitnessEffects(noIntGenes = gi) |
315 |
- n <- 65 |
|
315 |
+ n <- 75 |
|
316 | 316 |
max.tries <- 4 |
317 | 317 |
for(tries in 1:max.tries) { |
318 | 318 |
sa <- oncoSimulPop(n, |
... | ... |
@@ -12,10 +12,11 @@ author: " |
12 | 12 |
" |
13 | 13 |
date: "`r paste0(Sys.Date(),'. OncoSimulR version ', packageVersion('OncoSimulR'), '. Revision: ', system('git rev-parse --short HEAD', intern = TRUE))`" |
14 | 14 |
output: |
15 |
- bookdown::html_document2: |
|
15 |
+ bookdown::html_document2: |
|
16 |
+ css: custom4.css |
|
16 | 17 |
toc: yes |
17 | 18 |
toc_float: true |
18 |
- css: custom4.css |
|
19 |
+ |
|
19 | 20 |
classoption: a4paper |
20 | 21 |
geometry: margin=3cm |
21 | 22 |
fontsize: 12pt |
... | ... |
@@ -31,6 +32,66 @@ vignette: > |
31 | 32 |
%\VignetteDepends{OncoSimulR} |
32 | 33 |
--- |
33 | 34 |
|
35 |
+<!-- html_book seems to ignore the toc_float --> |
|
36 |
+ |
|
37 |
+ <!-- bookdown::gitbook: --> |
|
38 |
+ <!-- self_contained: false --> |
|
39 |
+ <!-- split_by: rmd --> |
|
40 |
+ <!-- css: custom4.css --> |
|
41 |
+ <!-- github-repo: "rdiaz02/OncoSimul" --> |
|
42 |
+ <!-- config: --> |
|
43 |
+ <!-- toc: --> |
|
44 |
+ <!-- collapse: subsection --> |
|
45 |
+ <!-- download: null --> |
|
46 |
+ <!-- sharing: null --> |
|
47 |
+ |
|
48 |
+ |
|
49 |
+<!-- A great one? Well... Slow, and no subsubsection and strange scrolling--> |
|
50 |
+<!-- render("OncoSimulR.Rmd", bookdown::gitbook(self_contained = FALSE, split_by = "none")) --> |
|
51 |
+<!-- Slow rendering, and the clicking on TOC to get expanded entries does --> |
|
52 |
+<!-- not work. --> |
|
53 |
+<!-- And it creates a libs dir that takes 5 MB. --> |
|
54 |
+<!-- What I like is the possibility to hide the TOC, change rendering --> |
|
55 |
+<!-- (color, font size and type) and download. --> |
|
56 |
+ |
|
57 |
+<!-- This did not work well either. --> |
|
58 |
+ <!-- bookdown::gitbook: --> |
|
59 |
+ <!-- toc-depth: 4 --> |
|
60 |
+ <!-- self_contained: false --> |
|
61 |
+ <!-- split_by: none --> |
|
62 |
+ <!-- css: custom4.css --> |
|
63 |
+ <!-- github-repo: "rdiaz02/OncoSimul" --> |
|
64 |
+ <!-- config: --> |
|
65 |
+ <!-- toc: --> |
|
66 |
+ <!-- collapse: section --> |
|
67 |
+ <!-- scroll_highlight: true --> |
|
68 |
+ <!-- after: null --> |
|
69 |
+ <!-- before: null --> |
|
70 |
+ <!-- toc-depth: 4 --> |
|
71 |
+ <!-- toolbar: --> |
|
72 |
+ <!-- position: fixed --> |
|
73 |
+ <!-- edit: --> |
|
74 |
+ <!-- link: null --> |
|
75 |
+ <!-- text: null --> |
|
76 |
+ <!-- download: null --> |
|
77 |
+ <!-- search: no --> |
|
78 |
+ <!-- fontsettings: --> |
|
79 |
+ <!-- theme: white --> |
|
80 |
+ <!-- family: sans --> |
|
81 |
+ <!-- size: 2 --> |
|
82 |
+ <!-- sharing: null --> |
|
83 |
+ |
|
84 |
+<!-- download, only on my web site --> |
|
85 |
+<!-- EPUB and MOBI and PDF --> |
|
86 |
+<!-- url: "https\://" --> |
|
87 |
+ |
|
88 |
+<!-- output: --> |
|
89 |
+<!-- bookdown::html_document2: --> |
|
90 |
+<!-- toc: yes --> |
|
91 |
+<!-- toc_float: true --> |
|
92 |
+<!-- css: custom4.css --> |
|
93 |
+ |
|
94 |
+ |
|
34 | 95 |
<!-- ## <rdiaz02@gmail.com>, <http://ligarto.org/rdiaz> --> |
35 | 96 |
<!-- ## date: "`r Sys.Date()`" --> |
36 | 97 |
|
... | ... |
@@ -38,7 +99,20 @@ vignette: > |
38 | 99 |
<!-- ## Bioc html_document2 too wide margins and really ugly --> |
39 | 100 |
<!-- ## Simplest is to use bookdown and add BioC CSS --> |
40 | 101 |
<!-- ## Rmdformats is really neat, but no support for \@ref --> |
41 |
-<!-- ## PDF as: render("OncoSimulR.Rmd", output_format = bookdown::pdf_document2(toc = TRUE, toc_depth = 4, keep_tex = TRUE, includes = includes("before_body" = "my-header.tex"))) --> |
|
102 |
+<!-- ## PDF as: |
|
103 |
+ |
|
104 |
+<!-- render("OncoSimulR.Rmd", output_format = bookdown::pdf_document2(toc = TRUE, toc_depth = 4, keep_tex = TRUE) --> |
|
105 |
+ |
|
106 |
+<!-- --> |
|
107 |
+ |
|
108 |
+ |
|
109 |
+<!-- After the fix in BiocStyle 2.3.24 can use this too, which gives the --> |
|
110 |
+<!-- BiocStyle output, but it is not the same as the one for Rnw and --> |
|
111 |
+<!-- breaks refs, etc. I do not really like it--> |
|
112 |
+<!-- ## PDF as: render("OncoSimulR.Rmd", output_format = BiocStyle::pdf_document2(toc = TRUE, toc_depth = 4, keep_tex = TRUE)) --> |
|
113 |
+ |
|
114 |
+ |
|
115 |
+ |
|
42 | 116 |
|
43 | 117 |
|
44 | 118 |
<!-- Fomr https://github.com/rstudio/bookdown/issues/153 --> |
... | ... |
@@ -50,7 +124,7 @@ MathJax.Hub.Config({ |
50 | 124 |
|
51 | 125 |
|
52 | 126 |
```{r setup, include=FALSE} |
53 |
-## use collapse for bookdowan, to collapse all the source and output |
|
127 |
+## use collapse for bookdown, to collapse all the source and output |
|
54 | 128 |
## blocks from one code chunk into a single block |
55 | 129 |
knitr::opts_chunk$set(echo = TRUE, collapse = TRUE) |
56 | 130 |
options(width = 70) |
... | ... |
@@ -83,8 +157,6 @@ possibility of adding passenger mutations to the simulations and |
83 | 157 |
allowing for several types of sampling. |
84 | 158 |
|
85 | 159 |
|
86 |
- |
|
87 |
- |
|
88 | 160 |
Since then, OncoSimulR has been vastly extended to allow you to |
89 | 161 |
specify other types of restrictions in the accumulation of genes, as |
90 | 162 |
such as the XOR models of @Korsunsky2014 or the "semimonotone" model |
... | ... |
@@ -607,6 +679,15 @@ poster, [http://dx.doi.org/10.7490/f1000research.1112860.1](http://dx.doi.org/10 |
607 | 679 |
presented at ECCB 2016. |
608 | 680 |
|
609 | 681 |
|
682 |
+### HTML and PDF versions of the vignette {#pdfvignette} |
|
683 |
+ |
|
684 |
+A PDF version of this vignette is available from |
|
685 |
+<https://rdiaz02.github.io/OncoSimul/pdfs/OncoSimulR.pdf>. And an |
|
686 |
+HTML version from |
|
687 |
+<https://rdiaz02.github.io/OncoSimul/OncoSimulR.html>. These files |
|
688 |
+correspond to the most recent, github version, of the package (i.e., |
|
689 |
+they might include changes not yet available from the BioConudctor |
|
690 |
+package). |
|
610 | 691 |
|
611 | 692 |
|
612 | 693 |
|
... | ... |
@@ -762,7 +843,7 @@ wanted.) |
762 | 843 |
|
763 | 844 |
|
764 | 845 |
That's it. You can plot that fitnessEffects object |
765 |
-```{r, out.width="6cm", out.height = "6cm"} |
|
846 |
+```{r} |
|
766 | 847 |
plot(fem4) |
767 | 848 |
``` |
768 | 849 |
|
... | ... |
@@ -792,7 +873,7 @@ indicating that the gene of that column is mutated or not. Column $g+ 1$ |
792 | 873 |
contains the fitness values. And you do not even need to specify all the |
793 | 874 |
genotypes (we will assume that the missing genotypes have fitness 1): |
794 | 875 |
|
795 |
-```{r, out.width="6cm", out.height = "6cm"} |
|
876 |
+```{r} |
|
796 | 877 |
m6 <- cbind(c(1, 1), c(1, 0), c(2, 3)) |
797 | 878 |
fem6 <- allFitnessEffects(genotFitness = m6) |
798 | 879 |
evalAllGenotypes(fem6, addwt = TRUE) |
... | ... |
@@ -2935,7 +3016,7 @@ to a change in the cell's fitness by $s_P$. For cells with the primary |
2935 | 3016 |
driver mutation, the fitness advantage obtained with each secondary driver |
2936 | 3017 |
mutation is $s_{DP}$." |
2937 | 3018 |
|
2938 |
-The proliferation probability is given as (ignoring constants such as $1/2$): |
|
3019 |
+The proliferation probability is given as: |
|
2939 | 3020 |
|
2940 | 3021 |
|
2941 | 3022 |
* $\frac{1}{2}(1 + s_p)^k$ when there are $k$ secondary drivers mutated and no primary diver; |
... | ... |
@@ -2948,7 +3029,7 @@ apoptosis is one minus the proliferation rate. |
2948 | 3029 |
|
2949 | 3030 |
We cannot find a simple mapping from their expressions to our fitness |
2950 | 3031 |
parameterization, but we can get fairly close by using a DAG; in this one, |
2951 |
-note the unusual feature of having on of the "s" terms (that for the |
|
3032 |
+note the unusual feature of having one of the "s" terms (that for the |
|
2952 | 3033 |
driver dependency on root) be negative. Using the parameters given in the |
2953 | 3034 |
legend of their Figure 3 for $s_p, S_D^+, S_D^-, S_{DP}$ and obtaining |
2954 | 3035 |
that negative value for the dependency of the driver on root we can do: |
... | ... |
@@ -2990,17 +3071,17 @@ plot(b1, use_ggrepel = TRUE) |
2990 | 3071 |
``` |
2991 | 3072 |
|
2992 | 3073 |
|
2993 |
-### Specifying fitness directly |
|
3074 |
+### Specifying fitness of genotypes directly |
|
2994 | 3075 |
|
2995 | 3076 |
An alternative approach to specify the fitness, if the number of |
2996 | 3077 |
genotypes is reasonably small, is to directly evaluate fitness as |
2997 | 3078 |
given by their expressions. Then, use the `genotFitness` argument to |
2998 | 3079 |
*`allFitnessEffects`*. |
2999 | 3080 |
|
3000 |
-We will create all possible genotypes and then a function that gives |
|
3001 |
-the fitness of each genotype according to their expression; we will |
|
3002 |
-call this function on the data frame of genotypes, and pass this |
|
3003 |
-data frame to *`allFitnessEffects`*. |
|
3081 |
+We will create all possible genotypes; then we will write a function |
|
3082 |
+that gives the fitness of each genotype according to their |
|
3083 |
+expression; finally, we will call this function on the data frame of |
|
3084 |
+genotypes, and pass this data frame to *`allFitnessEffects`*. |
|
3004 | 3085 |
|
3005 | 3086 |
|
3006 | 3087 |
```{r} |
... | ... |
@@ -3474,7 +3555,7 @@ Of course the "s" and "sh" are set arbitrarily here. |
3474 | 3555 |
|
3475 | 3556 |
|
3476 | 3557 |
|
3477 |
-## Raphael and Vandin'2 2014 modules {#raphael-ex} |
|
3558 |
+## Raphael and Vandin's 2014 modules {#raphael-ex} |
|
3478 | 3559 |
|
3479 | 3560 |
In @Raphael2014a, the authors show several progression models |
3480 | 3561 |
in terms of modules. We can code the extended poset for the colorectal |
... | ... |
@@ -1,15 +1,15 @@ |
1 | 1 |
\usepackage[% |
2 |
- shash={c6b9674}, |
|
3 |
- lhash={c6b9674d97ee91699bb4925cf5668875740db56e}, |
|
2 |
+ shash={9721ede}, |
|
3 |
+ lhash={9721ede501cdd8097125e8b77e2b740ea57f1bc7}, |
|
4 | 4 |
authname={ramon diaz-uriarte (at Phelsuma)}, |
5 | 5 |
authemail={rdiaz02@gmail.com}, |
6 |
- authsdate={2016-08-16}, |
|
7 |
- authidate={2016-08-16 16:41:29 +0200}, |
|
8 |
- authudate={1471358489}, |
|
6 |
+ authsdate={2016-08-25}, |
|
7 |
+ authidate={2016-08-25 10:24:30 +0200}, |
|
8 |
+ authudate={1472113470}, |
|
9 | 9 |
commname={ramon diaz-uriarte (at Phelsuma)}, |
10 | 10 |
commemail={rdiaz02@gmail.com}, |
11 |
- commsdate={2016-08-16}, |
|
12 |
- commidate={2016-08-16 16:41:29 +0200}, |
|
13 |
- commudate={1471358489}, |
|
14 |
- refnames={ (HEAD -> rmd, origin/master, origin/HEAD, master)} |
|
11 |
+ commsdate={2016-08-25}, |
|
12 |
+ commidate={2016-08-25 10:24:30 +0200}, |
|
13 |
+ commudate={1472113470}, |
|
14 |
+ refnames={ (HEAD -> master, origin/rmd, rmd)} |
|
15 | 15 |
]{gitsetinfo} |
16 | 16 |
\ No newline at end of file |