Description Usage Arguments Value Examples
Creates a scatterplot given two dimensions from a data dimension reduction tool (e.g tSNE) output.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | plotDimReduceGrid(x, ...)
## S4 method for signature 'SingleCellExperiment'
plotDimReduceGrid(
x,
reducedDimName,
dim1 = NULL,
dim2 = NULL,
useAssay = "counts",
altExpName = "featureSubset",
size = 1,
xlab = "Dimension_1",
ylab = "Dimension_2",
limits = c(-2, 2),
colorLow = "blue4",
colorMid = "grey90",
colorHigh = "firebrick1",
midpoint = 0,
varLabel = NULL,
ncol = NULL,
headers = NULL,
decreasing = FALSE
)
## S4 method for signature 'matrix'
plotDimReduceGrid(
x,
dim1,
dim2,
size = 1,
xlab = "Dimension_1",
ylab = "Dimension_2",
limits = c(-2, 2),
colorLow = "blue4",
colorMid = "grey90",
colorHigh = "firebrick1",
midpoint = NULL,
varLabel = NULL,
ncol = NULL,
headers = NULL,
decreasing = FALSE
)
|
x |
Numeric matrix or a SingleCellExperiment object
with the matrix located in the assay slot under |
... |
Ignored. Placeholder to prevent check warning. |
reducedDimName |
The name of the dimension reduction slot in
|
dim1 |
Numeric vector. First dimension from data dimension reduction output. |
dim2 |
Numeric vector. Second dimension from data dimension reduction output. |
useAssay |
A string specifying which assay
slot to use if |
altExpName |
The name for the altExp slot to use. Default "featureSubset". |
size |
Numeric. Sets size of point on plot. Default 1. |
xlab |
Character vector. Label for the x-axis. Default 'Dimension_1'. |
ylab |
Character vector. Label for the y-axis. Default 'Dimension_2'. |
limits |
Passed to scale_colour_gradient2. The range of color scale. |
colorLow |
Character. A color available from 'colors()'. The color will be used to signify the lowest values on the scale. Default "blue4". |
colorMid |
Character. A color available from 'colors()'. The color will be used to signify the midpoint on the scale. Default "grey90". |
colorHigh |
Character. A color available from 'colors()'. The color will be used to signify the highest values on the scale. Default "firebrick1". |
midpoint |
Numeric. The value indicating the midpoint of the
diverging color scheme. If |
varLabel |
Character vector. Title for the color legend. |
ncol |
Integer. Passed to facet_wrap. Specify the number of columns for facet wrap. |
headers |
Character vector. If 'NULL', the corresponding rownames are used as labels. Otherwise, these headers are used to label the genes. |
decreasing |
logical. Specifies the order of plotting the points.
If |
The plot as a ggplot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(sceCeldaCG)
sce <- celdaTsne(sceCeldaCG)
plotDimReduceGrid(x = sce,
reducedDimName = "celda_tSNE",
xlab = "Dimension1",
ylab = "Dimension2",
varLabel = "tSNE")
library(SingleCellExperiment)
data(sceCeldaCG)
sce <- celdaTsne(sceCeldaCG)
plotDimReduceGrid(x = counts(sce),
dim1 = reducedDim(altExp(sce), "celda_tSNE")[, 1],
dim2 = reducedDim(altExp(sce), "celda_tSNE")[, 2],
xlab = "Dimension1",
ylab = "Dimension2",
varLabel = "tSNE")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.