plot_information_transfer: Plot the information transfer of a tree (drivers ordering).

View source: R/plot_information_transfer.R

plot_information_transferR Documentation

Plot the information transfer of a tree (drivers ordering).

Description

The information transfer of the tree is the set of orderings associated to the internal annotated driver events.

This function plots these orderings following a topological sort of the node of the corresponding clone tree.

Usage

plot_information_transfer(
  x,
  node_palette = colorRampPalette(RColorBrewer::brewer.pal(n = 9, "Set1")),
  tree_layout = "tree",
  ...
)

Arguments

x

A ctree tree.

node_palette

A function that can return, for an input number, a number of colours.

tree_layout

Layout of this model, as of ggraph.

...

Other parameters, not used in this case.

Value

A ggplot object for the plot.

Examples

data(ctree_input)

x = ctrees(
ctree_input$CCF_clusters, 
ctree_input$drivers,
ctree_input$samples,
ctree_input$patient,
ctree_input$sspace.cutoff,
ctree_input$n.sampling,
ctree_input$store.max
)

plot_information_transfer(x[[1]])

# Change layout -- use igraph's "kk" layout
plot_information_transfer(x[[1]], tree_layout = 'kk')

caravagnalab/ctree documentation built on May 12, 2022, 4:42 p.m.