Description Usage Arguments Value Note Author(s) See Also Examples
Plot a parent-child relationship of the clones, controlling which clones are displayed, and whether to shown number of times of appearance, and time of first appearance of a clone.
1 2 3 |
x |
The output from a simulation, as obtained from
|
N |
Show in the plot all clones that have a population size of at
least N at time |
t |
The time at which |
timeEvents |
If TRUE, the vertical position of the nodes in the plot will be proportional to their time of first appearance. |
keepEvents |
If TRUE, the graph will show all the birth events. Thus, the number of arrows shows the number of times a clone give rise to another. For large graphs with many events, this slows the graph considerably. |
fixOverlap |
When using |
returnGraph |
If TRUE, the igraph object is returned. You can use this to plot the object however you want or obtain the adjacency matrix. |
... |
Additional arguments. Currently not used. |
.
A plot is produced. If returnGraph
the igraph object is returned.
These are not, technically, proper phylogenetic trees and we use "phylogeny" here in an abuse of terminology. The plots we use, where we show parent child relationships are arguably more helpful in this context. But you could draw proper phylogenies with the information provided.
If you want to obtain the adjacency matrix, this is trivial: just
set returnGraph = TRUE
and use get.adjacency
. See
an example below.
Ramon Diaz-Uriarte
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | data(examplesFitnessEffects)
tmp <- oncoSimulIndiv(examplesFitnessEffects[["o3"]],
model = "McFL",
mu = 5e-5,
detectionSize = 1e8,
detectionDrivers = 3,
sampleEvery = 0.025,
max.num.tries = 10,
keepEvery = 5,
initSize = 2000,
finalTime = 3000,
onlyCancer = FALSE,
keepPhylog = TRUE)
## Show only those with N > 10 at end
plotClonePhylog(tmp, N = 10)
## Show only those with N > 1 between times 5 and 1000
plotClonePhylog(tmp, N = 1, t = c(5, 1000))
## Show everything, even if teminal nodes are extinct
plotClonePhylog(tmp, N = 0)
## Show time when first appeared
plotClonePhylog(tmp, N = 10, timeEvents = TRUE)
## Not run:
## Show each event
## This can take a few seconds
plotClonePhylog(tmp, N = 10, keepEvents = TRUE)
## End(Not run)
## Adjacency matrix
require(igraph)
get.adjacency(plotClonePhylog(tmp, N = 10, returnGraph = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.