treeForceStretchCoords: Stretch points in force-directed layout

Description Usage Arguments Value

View source: R/tree-force-layout.R View source: R/tree-force-layout.R

Description

This function can be used in addition to treeForceRotateCoords and treeForceTranslateCoords in order to fine-tune the presentation of a force-directed layout. For instance, this can be used to achieve an improved 2D visualization by shortening or lengthening a branch of the tree if branches have dramatically different lengths in pseudotime. (This occurs, for instance, in data sets generated from a single timepoint in a homeostatic animal instead of an explicit timecourse.) This transformation will only occur in the force-directed layout, not the dendrogram tree layout.

Usage

1
2
3
4
5
6
7
8
9
treeForceStretchCoords(
  object,
  factor,
  cells = NULL,
  seg = NULL,
  stretch.from = 20,
  throw.out.cells = 0,
  ramp = 0.1
)

Arguments

object

An URD object

factor

(Numeric) Factor to lengthen (>1) or shrink (<1) the branch by.

cells

(Character vector) Cells to modify (Default NULL is all cells in the force-directed layout)

seg

(Character) Instead of specifying cells, just grab all cells from this segment and downstream. Ignored if cells is specified.

throw.out.cells

(Numeric) Throw out the youngest N cells in pseudotime (i.e. don't stretch those)

Value

An URD object with the coordinates of some cells in @tree$walks.force.layout modified.


farrellja/URD documentation built on June 17, 2020, 4:48 a.m.