Description Usage Arguments Value
Plots cells according to their coordinates in a dimensionality reduction (tSNE by default).
Cells are colored according to two user set labels (label.red
and label.green
)
in a mode that simulates dual-color microscopy - cells that express neither label are black,
cells that express one label are red or green, and cells that express both labels are yellow.
Both labels must be continuous variables (i.e. not cluster identities).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | plotDimDual(
object,
label.red,
label.green,
label.red.type = "search",
label.green.type = "search",
reduction.use = c("tsne", "pca", "dm"),
dim.x = 1,
dim.y = 2,
point.size = 1,
alpha = 1,
plot.title = "",
legend = T,
legend.size = 1/5.5,
legend.offset.x = 0,
legend.offset.y = 0,
x.lim = NULL,
y.lim = NULL,
na.rm = F,
na.alpha = 0.4 * alpha
)
|
object |
An URD object |
label.red |
(Character) Data to use for coloring points for the red channel |
label.green |
(Character) Data to use for coloring points for the green channel |
label.red.type |
(Character) Type of data to search for the label for the red channel. Default is "search" which checks several data types in order. For more information: |
label.green.type |
(Character) Type of data to search for the label for the green channel. Default is "search" which checks several data types in order. For more information: |
reduction.use |
(Character) Dimensionality reduction to use (tSNE, PCA, or Diffusion Map) |
dim.x |
(Numeric) Component to use on x-axis |
dim.y |
(Numeric) Component to use on y-axis |
point.size |
(Numeric) Size of points on plot |
alpha |
(Numeric) Transparency of points on plot: 0 (Transparent) - 1 (Opaque) |
plot.title |
(Character) Title of the plot |
legend |
(Logical) Show a legend? |
legend.size |
(Numeric) Adjusts the size of the legend. |
legend.offset.x |
(Numeric) Adjust the legend position (in terms of dimensionality reduction coordinates) |
legend.offset.y |
(Numeric) Adjust the legend position (in terms of dimensionality reduction coordinates) |
x.lim |
(Numeric) Limits of x-axis (NULL autodetects) |
y.lim |
(Numeric) Limits of y-axis (NULL autodetects) |
na.rm |
(Logical) If |
na.alpha |
(Numeric) If |
A ggplot2 object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.