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

Description Usage Arguments Value Examples

View source: R/plot_information_transfer.R

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

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

Arguments

x

A mtree 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(mtree_input)

x = mtrees(
mtree_input$binary_clusters, 
mtree_input$drivers,
mtree_input$samples,
mtree_input$patient,
mtree_input$sspace.cutoff,
mtree_input$n.sampling,
mtree_input$store.max
)

plot_information_transfer(x[[1]])

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

caravagn/mtree documentation built on Sept. 17, 2020, 1:13 a.m.