treeForceRotateCoords: Rotate points in force-directed layout

Description Usage Arguments Value

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

Description

This function can be used in addition to 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 modifying overlapping portions of the layout.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
treeForceRotateCoords(
  object,
  cells = NULL,
  seg = NULL,
  angle,
  axis = c("x", "y", "z"),
  around.cell = NULL,
  throw.out.cells = 0,
  pseudotime = NULL
)

Arguments

object

An URD object

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.

angle

(Numeric) Angle to rotate

axis

(Character: "x", "y", "z") Axis around which to rotate

around.cell

(Character or Numeric) If a character, then the name of a cell to rotate around. If numeric, then will choose the Nth cell by pseudotime. (This can be helpful for rotating a segment around its base to spread segments of the tree apart more. If NULL, then rotates around (0,0,0).

throw.out.cells

(Numeric) Throw out the youngest N cells in pseudotime

pseudotime

(Character) Pseudotime (i.e. column name of @pseudotime) to use for determining cells to throw out.

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.