Plot a trajectory as a dendrogram

Plot a trajectory as a dendrogram

plot_dendro(trajectory, color_cells = c("auto", "none", "grouping",
  "feature", "milestone", "pseudotime"), grouping = NULL,
  groups = NULL, feature_oi = NULL, expression_source = "expression",
  pseudotime = NULL, color_milestones = c("auto", "given", "cubeHelix",
  "Set3", "rainbow"), milestones = NULL, milestone_percentages = NULL,
  diag_offset = 0.05, y_offset = 0.2)

Arguments

trajectory

The trajectory

color_cells

How to color the cells

grouping

The grouping of the cells

groups

Tibble containing information of the cell groups

feature_oi

feature to plot expression

expression_source

Source of the feature expression, defaults to `expression`

pseudotime

The pseudotime

color_milestones

How to color the cells

milestones

Tibble containing the `milestone_id` and a `color` for each milestone

milestone_percentages

The milestone percentages

diag_offset

The x-offset (percentage of the edge lenghts) between milestones

y_offset

The size of the quasirandom cell spreading in the y-axis

Examples

data(example_tree) plot_dendro(example_tree)
#> root cell or milestone not provided, trying first outgoing milestone_id
#> Using 'M1' as root
#> Coloring by milestone
#> Using milestone_percentages from trajectory
static/images/examples/plot_dendro-1
plot_dendro(example_tree, color_cells = "pseudotime")
#> root cell or milestone not provided, trying first outgoing milestone_id
#> Using 'M1' as root
#> Pseudotime not provided, will calculate pseudotime from root milestone
static/images/examples/plot_dendro-2
plot_dendro( example_tree, color_cells = "grouping", grouping = dynwrap::group_onto_nearest_milestones(example_tree) )
#> root cell or milestone not provided, trying first outgoing milestone_id
#> Using 'M1' as root
static/images/examples/plot_dendro-3