Description Usage Arguments Details Value Author(s) Examples
Provides a summary the spatial distribution of mutants within the simulated tumor.
1 | spatialDistribution(tumor, N = 500, cutoff = 0.01, make.plot = TRUE)
|
tumor |
A list which is the output of |
N |
The number of pairs to sample. |
cutoff |
For a plot of clone sizes, all mutations with a MAF below |
make.plot |
Whether or not to make plots. |
The genotype of a cell can be interpreted as a binary vector where the i-th component is 1 if mutation i is present in the cell and is 0 otherwise. Then a natural comparison of the similarity between two cells is the Jaccard index J(A,B) = |I(A,B)|/|U(A,B)|, where I(A,B) is the intersection of A and B and U(A,B) is the union. This function estimates the Jaccard index as a function of Euclidean distance between the cells by randomly sampling N pairs of cells.
A list with the following components
mean_mutant
- A data frame with 2 columns giving the mean number of mutants
as a function of Euclidean distance from the lattice origin (Euclid. distance rounded to nearest integer).
mean_driver
- The same as mean_mutant
except for driver mutations only. Will be NULL
if
no drivers are present in the simulated tumor.
jaccard
A data frame with two columns giving mean jaccard index as a function of Euclidean distance
between pairs of cells (rounded to nearest integer).
Phillip B. Nicol
1 2 3 | set.seed(1126490984)
out <- simulateTumor(max_pop = 1000, driver_prob = 0.1)
sp <- spatialDistribution(tumor = out, make.plot = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.