simplify_trajectory: Simplify a trajectory by removing transient milestones

View source: R/simplify_trajectory.R

simplify_trajectoryR Documentation

Simplify a trajectory by removing transient milestones

Description

  • Milestones that are not a leaf or a branching point are removed: A -> B -> C becomes A -> C

  • Cycles contain at least 3 nodes, ie. A -> B -> A becomes A -> B -> C -> A

  • Loops are converted to a cycle, unless allow_self_loops = TRUE

Usage

simplify_trajectory(trajectory, allow_self_loops = FALSE)

Arguments

trajectory

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

allow_self_loops

Whether or not to allow self loops.

Details

The positions of the cells within the trajectory remain the same.

Value

A trajectory object


dynwrap documentation built on July 26, 2023, 5:15 p.m.