% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree-force-layout.R
\name{plotTreeForceDual}
\alias{plotTreeForceDual}
\title{Plot force-directed layout of tree}
\usage{
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
)
}
\arguments{
\item{object}{An URD object}

\item{label.red}{(Character) Data to use for coloring tree (red channel) (see \link{data.for.plot})}

\item{label.green}{(Character) Data to use for coloring tree (green channel) (see \link{data.for.plot})}

\item{view}{(Character) Name of view to use (i.e. the name of an entry in \code{@tree$force.view.list}) created by \link{plotTreeForceStore3DView}. Default is last view created.}

\item{alpha}{(Numeric) Maximum transparency of points}

\item{alpha.fade}{(Numeric) Minimum transparency of points}

\item{size}{(Numeric) Size of points in the plot}

\item{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.)}

\item{title.cex}{(Numeric) Adjust the title font size}

\item{title.line}{(Numeric) Adjust the position of the title. Positive numbers move the title upward.}

\item{label.tips}{(Logical) Should text identifying the tips of the tree be placed in the force directed layout? Defaults to TRUE if \code{@tree$segment.names} has been set.}

\item{use.short.names}{(Logical) Should short names from \code{@tree$segment.names.short} be used? Defaults to TRUE if those values have been set.}

\item{seg.show}{(Character vector) Segments of the tree to put on the plot (Default \code{NULL} is all segments)}

\item{cells.show}{(Character vector) Cells of the tree to show (Default \code{NULL} is all cells)}

\item{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 \code{alpha.fade}.}

\item{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}

\item{density.alpha}{(Logical) Should points with short distance to nearest neighbors (i.e. in denser regions of the plot) be more transparent?}

\item{label.spacing}{(Numeric) How far should labels be from the detected tips}

\item{text.cex}{(Numeric) Size of the label text}

\item{label.type.red}{(Character) Where to find data for red channel label (default \code{"search"} auto-detects, see \link{data.for.plot})}

\item{label.type.green}{(Character) Where to find data for green channel label (default \code{"search"} auto-detects, see \link{data.for.plot})}
}
\value{
Nothing. Produces a plot using the \code{rgl} package, displayed in an X11 window.
}
\description{
This plots data on the force-directed layout of an URD tree, generated by 
\code{\link{treeForceDirectedLayout}}, using red and green (which become yellow
when they overlap to display two pieces of data simultaneously. See 
\code{\link{plotTreeForce}} for more details.
}
\examples{
# 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")

}
