View source: R/get_clone_trees.R
get_clone_trees | R Documentation |
This function uses the output fit of VIBER
to create a call to ctree
(https://caravagn.github.io/ctree/),
a package to create clone trees for cancer evolution models.
Creation of a clone tree requires annotations that are not usually
necessary for just a plain VIBER analyses. These annotations report the status of driver
and gene
for each one of the input datapoints; the annotations should
have been passed when calling the variational_fit
function, and stored
inside the data
field of the VIBER object.
The clonal cluster is estimated from the cluster with the highest parameter values in most of the input dimensions (Binomial peaks).
The output is the result of calling the constructor ctree::cetrees
on the input clustering results x
.
get_clone_trees(x, ...)
x |
A VIBER fit. |
... |
Extra parameters passed to the constructor |
The output of the constructor ctree::cetrees
.
data(mvbmm_example) # We create annotation data assigning dummy names # and picking 10 events to be drivers (randomly chosen) data_annotations = data.frame( gene = paste0("G", 1:nrow(mvbmm_example$trials)), driver = FALSE ) data_annotations$driver[sample(1:nrow(data_annotations), 10)] = TRUE # Compared to the main variational_fit, we use the same call but add data f = variational_fit(mvbmm_example$successes, mvbmm_example$trials, data = data_annotations) print(f) trees = get_clone_trees(f) ctree:::print.ctree(trees[[1]]) ctree::plot.ctree(trees[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.