Browse code

2.17.7: no longer depends on nem; more models from MAGELLAN

ramon diaz-uriarte (at Phelsuma) authored on 30/01/2020 13:39:14
Showing 1 changed files
... ...
@@ -84,7 +84,10 @@ sh. See \code{\link{allFitnessEffects}}}
84 84
   input, as "restriction table" in  \code{\link{allFitnessEffects}}.
85 85
 
86 86
 }
87
-\author{Ramon Diaz-Uriarte}
87
+\author{Ramon Diaz-Uriarte. Code for transitive closure taken from the
88
+  nem package, whose authors are Holger Froehlich, Florian Markowetz,
89
+  Achim Tresch, Theresa Niederberger, Christian Bender, Matthias Maneck,
90
+  Claudio Lottaz, Tim Beissbarth}
88 91
 
89 92
 \examples{
90 93
 (a1 <- simOGraph(10))
Browse code

version 2.7.2 Changes in version 2.7.2 (2017-09-27): - genot_to_adj_mat in C++. - fast_peaks (for no backmutation cases). - Better explanation and testing of peaks and valleys. - Clarified simOGraph transitive reduction. - Better handling of ti corner cases. - Magellan reading fuctions adapted to output of newer (as of 2017-07) version of Magellan. - sorting gene names in allGenotypes_to_matrix. - sampledGenotypes: genotype names with sorted gene names.

ramon diaz-uriarte (at Phelsuma) authored on 27/09/2017 10:23:50
Showing 1 changed files
... ...
@@ -34,8 +34,9 @@ s = 0.1, sh = -0.1, typeDep = "AND")
34 34
   \item{removeDirectIndirect}{
35 35
     Ensure that no two nodes are connected both directly (i.e., with an
36 36
   edge between them) and indirectly, through intermediate nodes. If
37
-  TRUE, the direct connections are removed from the graph starting from
38
-  the bottom.
37
+  TRUE, we return the transitive reduction of the DAG.
38
+  %% the final DAG returned is the transitive reduction of thethe direct
39
+  %% connections are removed from the graph starting from the bottom.
39 40
 }
40 41
 \item{rootName}{
41 42
   The name you want to give the "Root" node.
Browse code

v.2.5.2 - Lots and lots of addition to vignette including benchmarks. - Diversity of sampled genotypes. - Genotyping error can be added in samplePop. - LOD and POM (lines of descent, path of maximum, sensu Szendro et al.). - simOGraph can also out rT data frames. - Better (and better explained) estimates of simulation error for McFL.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/OncoSimulR@124982 bc3139a8-67e5-0310-9ffc-ced21a209358

Ramon Diaz-Uriarte authored on 10/12/2016 16:05:05
Showing 1 changed files
... ...
@@ -7,8 +7,11 @@
7 7
   Simulate DAGs that represent restrictions in the accumulation of mutations.
8 8
 }
9 9
 \usage{
10
-simOGraph(n, h = 4, conjunction = TRUE, nparents = 3,
11
-multilevelParent = TRUE, removeDirectIndirect = TRUE, rootName = "Root")
10
+simOGraph(n, h = ifelse(n >= 4, 4, n), conjunction = TRUE, nparents = 3,
11
+multilevelParent = TRUE, removeDirectIndirect = TRUE, rootName = "Root",
12
+geneNames = seq.int(n), out = c("adjmat", "rT"),
13
+s = 0.1, sh = -0.1, typeDep = "AND")
14
+
12 15
 }
13 16
 
14 17
 \arguments{
... ...
@@ -36,9 +39,27 @@ multilevelParent = TRUE, removeDirectIndirect = TRUE, rootName = "Root")
36 39
 }
37 40
 \item{rootName}{
38 41
   The name you want to give the "Root" node.
42
+}
39 43
 
44
+\item{geneNames}{
45
+  The names you want to give the the non-root nodes.
40 46
 }
47
+
48
+
49
+\item{out}{Whether the ouptut should be an adjacency matrix  or a
50
+  "restriction table", as used in   \code{\link{allFitnessEffects}}.}
51
+
52
+\item{s}{If using as output a restriction, the default value for s. See
53
+\code{\link{allFitnessEffects}}.}
54
+
55
+\item{sh}{If using as output a restriction, the default value for
56
+sh. See \code{\link{allFitnessEffects}}}
57
+
58
+\item{typeDep}{If using as output a restriction, the default value for
59
+"typeDep". See \code{\link{allFitnessEffects}}}
60
+
41 61
 }
62
+
42 63
 \details{
43 64
   This is a simple, heuristic procedure for generating graphs of
44 65
   restrictions that seem compatible with published trees in the
... ...
@@ -58,7 +79,9 @@ multilevelParent = TRUE, removeDirectIndirect = TRUE, rootName = "Root")
58 79
 
59 80
 }
60 81
 \value{
61
-  An adjacency matrix for a directed graph.
82
+  An adjacency matrix for a directed graph or a data frame to be used as
83
+  input, as "restriction table" in  \code{\link{allFitnessEffects}}.
84
+
62 85
 }
63 86
 \author{Ramon Diaz-Uriarte}
64 87
 
... ...
@@ -66,6 +89,8 @@ multilevelParent = TRUE, removeDirectIndirect = TRUE, rootName = "Root")
66 89
 (a1 <- simOGraph(10))
67 90
 library(graph) ## for simple plotting
68 91
 plot(as(a1, "graphNEL"))
92
+
93
+simOGraph(3, geneNames = LETTERS[1:3])
69 94
 }
70 95
 
71 96
 \keyword{ graphs }
Browse code

v. 1.99.0

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/OncoSimulR@105089 bc3139a8-67e5-0310-9ffc-ced21a209358

Ramon Diaz-Uriarte authored on 17/06/2015 17:17:55
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
1
+\name{simOGraph}
2
+\alias{simOGraph}
3
+\title{
4
+  Simulate oncogenetic/CBN/XMPN DAGs.
5
+}
6
+\description{
7
+  Simulate DAGs that represent restrictions in the accumulation of mutations.
8
+}
9
+\usage{
10
+simOGraph(n, h = 4, conjunction = TRUE, nparents = 3,
11
+multilevelParent = TRUE, removeDirectIndirect = TRUE, rootName = "Root")
12
+}
13
+
14
+\arguments{
15
+  \item{n}{
16
+    Number of nodes, or edges, in the graph. Like the number of genes.
17
+}
18
+  \item{h}{
19
+    Approximate height of the graph. See details.
20
+  }
21
+  \item{conjunction}{
22
+    If TRUE, conjunctions (i.e., multiple parents for a node) are allowed.
23
+}
24
+\item{nparents}{
25
+  Maximum number of parents of a node, when \code{conjunction} is TRUE.
26
+}
27
+\item{multilevelParent}{
28
+  Can a node have parents at different heights (i.e., parents that are
29
+  at different distance from the root node)?
30
+}
31
+  \item{removeDirectIndirect}{
32
+    Ensure that no two nodes are connected both directly (i.e., with an
33
+  edge between them) and indirectly, through intermediate nodes. If
34
+  TRUE, the direct connections are removed from the graph starting from
35
+  the bottom.
36
+}
37
+\item{rootName}{
38
+  The name you want to give the "Root" node.
39
+
40
+}
41
+}
42
+\details{
43
+  This is a simple, heuristic procedure for generating graphs of
44
+  restrictions that seem compatible with published trees in the
45
+  oncogenetic literature.
46
+
47
+  The basic procedure is as follows: nodes (argument \code{n}) are split
48
+  into approximately equally sized \code{h} groups, and then each node
49
+  from a level is connected to nodes chosen randomly from nodes of the
50
+  remaing superior (i.e., closer to the Root) levels. The number of
51
+  edges comes from a uniform distribution between 1 and \code{nparents}.
52
+
53
+  The actual depth of the graph can be smaller than \code{h} because
54
+  nodes from a level might be connected to superior levels skipping
55
+  intermediate ones.
56
+
57
+  See the vignette for further discussion about arguments. 
58
+
59
+}
60
+\value{
61
+  An adjacency matrix for a directed graph.
62
+}
63
+\author{Ramon Diaz-Uriarte}
64
+
65
+\examples{
66
+(a1 <- simOGraph(10))
67
+library(graph) ## for simple plotting
68
+plot(as(a1, "graphNEL"))
69
+}
70
+
71
+\keyword{ graphs }
72
+\keyword{ datagen }