Description Usage Arguments Value
View source: R/tree-force-layout.R View source: R/tree-force-layout.R
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.
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
)
|
object |
An URD object |
factor |
(Numeric) Factor to lengthen (>1) or shrink (<1) the branch by. |
cells |
(Character vector) Cells to modify (Default |
seg |
(Character) Instead of specifying cells, just grab all cells from this segment and downstream. Ignored if |
throw.out.cells |
(Numeric) Throw out the youngest N cells in pseudotime (i.e. don't stretch those) |
An URD object with the coordinates of some cells in @tree$walks.force.layout
modified.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.