plot_trajectories_per_cluster: Plot the number of observed trajectories in each cluster.

View source: R/plot_trajectories_per_clusters.R

plot_trajectories_per_clusterR Documentation

Plot the number of observed trajectories in each cluster.

Description

Assemble a figure that plots a graph (or tree) per cluster where each driver is connected to its trajectories. This allows to determine the most frequent trajectories in a cluster.

Usage

plot_trajectories_per_cluster(x, min_counts = 5)

Arguments

x

A revolver object with clusters computed.

min_counts

A scalare >= 1 to subset only trajectories observed in min_counts patients. If the value is in (0,1), the cut is interpreted as a percentage and used to determine its actual value from the cluster size (e.g., n * min_counts).

Value

A figure with multiple plots.

Examples

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

# In at least 5 cases
plot_trajectories_per_cluster(TRACERx_NEJM_2017_REVOLVER, min_counts = 5)

# In 50% of the cluster's cases
plot_trajectories_per_cluster(TRACERx_NEJM_2017_REVOLVER, min_counts = .5)

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