Description Usage Arguments Value Examples
View source: R/tree-force-layout.R
This plots data on the force-directed layout of an URD tree, generated by
treeForceDirectedLayout
, using red and green (which become yellow
when they overlap to display two pieces of data simultaneously. See
plotTreeForce
for more details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | plotTreeForceDual(
object,
label.red,
label.green,
label.red.type = "search",
label.green.type = "search",
view = "default",
alpha = 0.8,
alpha.fade = 0.025,
size = 5,
title = NULL,
title.cex = 3,
title.line = 0,
label.tips = (!is.null(object@tree$segment.names) |
!is.null(object@tree$segment.names.short)),
use.short.names = !is.null(object@tree$segment.names.short),
seg.show = NULL,
cells.show = NULL,
fade.below = (1/3),
fade.method = c("max", "min", "mean"),
density.alpha = T,
label.spacing = 5,
text.cex = 0.8
)
|
object |
An URD object |
label.red |
(Character) Data to use for coloring tree (red channel) (see data.for.plot) |
label.green |
(Character) Data to use for coloring tree (green channel) (see data.for.plot) |
view |
(Character) Name of view to use (i.e. the name of an entry in |
alpha |
(Numeric) Maximum transparency of points |
alpha.fade |
(Numeric) Minimum transparency of points |
size |
(Numeric) Size of points in the plot |
title |
(Character) Title to add to the plot. (This is sensitive to resizing the window after plotting, but if a view is stored, the window will be resized before the title is added, so it will be acceptable resolution for figures.) |
title.cex |
(Numeric) Adjust the title font size |
title.line |
(Numeric) Adjust the position of the title. Positive numbers move the title upward. |
label.tips |
(Logical) Should text identifying the tips of the tree be placed in the force directed layout? Defaults to TRUE if |
use.short.names |
(Logical) Should short names from |
seg.show |
(Character vector) Segments of the tree to put on the plot (Default |
cells.show |
(Character vector) Cells of the tree to show (Default |
fade.below |
(Numeric) If desired, transparency can be lowered for points with low expression values (thereby highlighting the portions of the tree with expression). This value is the portion of the range of expression values to fade. (The default, 1/3, fades the bottom third of the expression values.) A fully 'faded' point will have alpha of |
fade.method |
(Character: "max", "min", or "mean") Should fade be calculated on max expression of the two labels (emphasize any cells expressing either label), min expression of the two labels (emphasize only cells co-expressing both labels), or mean expression |
density.alpha |
(Logical) Should points with short distance to nearest neighbors (i.e. in denser regions of the plot) be more transparent? |
label.spacing |
(Numeric) How far should labels be from the detected tips |
text.cex |
(Numeric) Size of the label text |
label.type.red |
(Character) Where to find data for red channel label (default |
label.type.green |
(Character) Where to find data for green channel label (default |
Nothing. Produces a plot using the rgl
package, displayed in an X11 window.
1 2 3 4 5 | # Focus on all cells that express either gene
plotTreeForceDual(object, label.red="SOX17", label.green="SOX32", title="SOX32 (green) + SOX17 (red)")
# Focus on only the co-expressing cells by using fade.method="min"
plotTreeForceDual(object, label.red="SOX17", label.green="SOX32", title="SOX32 (green) + SOX17 (red)", fade.method="min")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.