View source: R/siteFrequency.R
siteFrequency | R Documentation |
siteFrequency()
calculates the site frequency in
units of time or mutations, as well as a normalized frequency.
siteFrequency(tree, includeStem = FALSE)
tree |
An ultrametric or mutation-based tree subset to include only the clone of interest. Alternatively, a list with several such trees. |
includeStem |
Boolean indicating whether we should count the stem of the tree as contributing to the site frequency distribution. Default is FALSE. |
A data.frame with three columns: the number of descendant cells, site frequency in units of time or mutations, and normalized site frequency. If a list of trees is input, output will be a list of such data.frames.
internalLengths()
and sharedMuts()
which
use the sum of edge lengths ancestral to between 2 and n-1 tips to calculate
a growth rate.
# Get site frequency of a single tree
example.df <- siteFrequency(exampleUltraTrees[[1]])
# Get site frequency of a list of trees
example.list <- siteFrequency(exampleMutTrees)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.