plot_drivers_graph: Plot graph-alike summary statistics for the cohort drivers.

View source: R/plot_drivers_graph.R

plot_drivers_graphR Documentation

Plot graph-alike summary statistics for the cohort drivers.

Description

Plot a graph with driver genes and annotate with different summary statistics for the trajectories that involve the drivers. This visualisation shows the frequency of the driver in the cohort (node size), the penalty for each pair of odering (edge thickness), the significance for the pair of orderings as of a Fisher test (edge coloring) and the overall heterogeneity upstream a driver as of the DET index (node coloring). This function has parameters to subset the computation to a list of predefined drivers, or drivers associated to trajectories with a minimum recurrence in the fits.

Usage

plot_drivers_graph(
  x,
  drivers = x$variantIDs.driver,
  min.occurrences = 0,
  alpha_level = 0.05,
  ...
)

Arguments

x

A REVOLVER object with fits.

drivers

The list of drivers to consider, all by default. See also function plot_penalty.

min.occurrences

The minimum number of occurrences for a trajectory to be considered, zero by default. See also function plot_penalty.

alpha_level

The significance level for the enrichment Fisher test.

...

Extra parameters passed to the create_layout function by ggraph. For instance, passing algorithm = 'kk' and layout = 'igraph' the 'igraph' layout 'kk' will be adopted.

Value

A 'ggplot' object of the plot.

See Also

Other Plotting functions: distinct_palette_few(), distinct_palette_many(), gradient_palette(), plot_DET_index(), plot_clusters(), plot_dendrogram(), plot_drivers_clonality(), plot_drivers_occurrence(), plot_jackknife_cluster_stability(), plot_jackknife_coclustering(), plot_jackknife_trajectories_stability(), plot_patient_CCF_histogram(), plot_patient_data(), plot_patient_mutation_burden(), plot_patient_oncoprint(), plot_patient_trees_scores()

Examples

# Data released in the 'evoverse.datasets'
data('TRACERx_NEJM_2017_REVOLVER', package = 'evoverse.datasets')

# Base plot, can be quite crowded
plot_drivers_graph(TRACERx_NEJM_2017_REVOLVER)

# Reduce the number of nodes cutting off low-frequencies one
plot_drivers_graph(TRACERx_NEJM_2017_REVOLVER, min.occurrences = 5)

# As above, but with a more stringent test
plot_drivers_graph(TRACERx_NEJM_2017_REVOLVER, min.occurrences = 5, alpha_level = 0.01)

caravagn/revolver documentation built on May 21, 2022, 5:48 p.m.