Description Usage Arguments Details Value Author(s) References See Also Examples
Compute Lines of Descent (LOD) and Path of the Maximum (POM) for a
single simulation or a set of simulations (from oncoSimulPop
).
diversityPOM
and diversityLOD
return the Shannon's
diversity (entropy) of the POM and LOD, respectively, of a set of
simulations (it makes no sense to compute those from a single simulation).
1 2 3 4 | POM(x)
LOD(x)
diversityPOM(lpom)
diversityLOD(llod)
|
x |
An object of class |
lpom |
A list of POMs, as returned from |
llod |
A list of LODs, as returned from |
Lines of Descent (LOD) and Path of the Maximum (POM) were defined in Szendro et al. (2013) and I follow those definitions here, as applied to a process in continuous time with sampling at user-specified periods.
For POM, the results can depend strongly on how often we sample (i.e.,
the sampleEvery
argument to oncoSimulIndiv
and
oncoSimulPop
), since the POM is computed by finding the clone
with largest population size whenever we sample.
This also explains why
it is generally meaningless to use POM on oncoSimulSample
runs:
these only keep the very last sample.
For LOD, a single LOD per simulation is returned, with the same meaning as that in p. 572 of Szendro et al. (2013). "A given genotype may undergo several episodes of colonization and extinction that are stored by the algorithm, and the last episode before the colonization of the final state is used to construct the step.", and I check that this genotype (which is the one that will become the most populated at final time) does not become extinct before the final colonization.
Note breaking changes: for LOD we used to return all lines of descent in a given simulation. In v. 2.9.1 we also returned the LOD as explained above. Now we only return the LOD as defined above.
For POM
either a character vector (if x
is a single
simulation) or a list of character vectors. Each character vector is
the ordered set of genotypes that contain the largest subpopulation at
the times of sampling.
For LOD
, if x
is a single simulation, the line of
descent as defined above (either an object of class "igraph.vs" (an
igraph vertex sequence: see vertex_attr
) or a
character vector if there were no descendants). If x
is a list
(population) of simulations, then a list where each element is a list
as just explained.
For diversityLOD
and diversityPOM
a single element
vector with the Shannon's diversity (entropy) of the LODs (for
diversityLOD
) or of the POMs (for diversityPOM
).
Ramon Diaz-Uriarte
Szendro, I. G., Franke, J., Visser, J. A. G. M. de, & Krug, J. (2013). Predictability of evolution depends nonmonotonically on population size. Proceedings of the National Academy of Sciences, 110(2), 571-576. https://doi.org/10.1073/pnas.1213613110
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 | ######## Using a poset for pancreatic cancer from Gerstung et al.
### (s and sh are made up for the example; only the structure
### and names come from Gerstung et al.)
pancr <- allFitnessEffects(data.frame(parent = c("Root", rep("KRAS", 4), "SMAD4", "CDNK2A",
"TP53", "TP53", "MLL3"),
child = c("KRAS","SMAD4", "CDNK2A",
"TP53", "MLL3",
rep("PXDN", 3), rep("TGFBR2", 2)),
s = 0.05,
sh = -0.3,
typeDep = "MN"))
pancr1 <- oncoSimulIndiv(pancr, model = "Exp")
pancr8 <- oncoSimulPop(8, pancr, model = "Exp",
mc.cores = 2)
POM(pancr1)
LOD(pancr1)
POM(pancr8)
LOD(pancr8)
diversityPOM(POM(pancr8))
diversityLOD(LOD(pancr8))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.