plot_graph: Plot a trajectory as a graph

Description Usage Arguments Value Examples

Description

Plot a trajectory as a graph

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
plot_graph(
  trajectory,
  color_cells = c("auto", "none", "grouping", "feature", "milestone", "pseudotime"),
  color_milestones = c("auto", "given", "cubeHelix", "Set3", "rainbow"),
  grouping = NULL,
  groups = NULL,
  feature_oi = NULL,
  pseudotime = NULL,
  expression_source = "expression",
  milestones = NULL,
  milestone_percentages = NULL,
  size_trajectory = 3,
  size_milestones = 8,
  alpha_cells = 1,
  size_cells = 2.5,
  border_radius_percentage = 0.1,
  arrow = grid::arrow(length = grid::unit(1, "cm"), type = "closed"),
  label_milestones = dynwrap::is_wrapper_with_milestone_labelling(trajectory),
  plot_milestones = FALSE,
  adjust_weights = FALSE
)

Arguments

trajectory

The trajectory as created by infer_trajectory() or add_trajectory()

color_cells

How to color the cells

color_milestones

Which palette to use for colouring the milestones * 'auto': Determine colours automatically. If 'color' is already specified in milestones tibble, this will be used. Otherwise, the colour scheme is determined by 'milestone_palette_list$auto'. * 'given': The 'milestones' object already contains a column 'color'. * 'cubeHelix': Use the 'rje::cubeHelix()' palette. * 'Set3': Use the 'RColorBrewer::brewer.pal(name = "Set3")' palette. * 'rainbow': Use the 'grDevices::rainbow()' palette.

grouping

The grouping of the cells

groups

Tibble containing information of the cell groups

feature_oi

feature to plot expression

pseudotime

The pseudotime

expression_source

Source of the feature expression, defaults to 'expression'

milestones

Tibble containing the column 'milestone_id' (character). If 'color_milestones' is set to '"given"', this tibble should also contain a column 'color' (character), containing colour hex codes (e.g. '"#123456"').

milestone_percentages

The milestone percentages

size_trajectory

The size of the transition lines between milestones.

size_milestones

The size of milestones.

alpha_cells

The alpha of the cells.

size_cells

The size of the cells.

border_radius_percentage

The fraction of the radius that is used for the border.

arrow

The type and size of arrow in case of directed trajectories. Set to NULL to remove arrow altogether.

label_milestones

How to label the milestones. Can be TRUE (in which case the labels within the trajectory will be used), "all" (in which case both given labels and milestone_ids will be used), a named character vector, or FALSE

plot_milestones

Whether to plot the milestones.

adjust_weights

Whether or not to rescale the milestone network weights

Value

A graph ggplot of a trajectory.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

dynverse/dynplot documentation built on June 18, 2021, 12:10 p.m.