plotDimReduceFeature {celda} | R Documentation |
Create a scatterplot for each row of a normalized gene expression matrix where x and y axis are from a data dimensionality reduction tool. The cells are colored by expression of the specified feature.
plotDimReduceFeature( dim1, dim2, counts, features, headers = NULL, normalize = FALSE, zscore = TRUE, exactMatch = TRUE, trim = c(-1, 1), size = 1, xlab = "Dimension_1", ylab = "Dimension_2", colorLow = "blue4", colorMid = "white", colorHigh = "firebrick1", midpoint = NULL, ncol = NULL )
dim1 |
Numeric vector. First dimension from data dimensionality reduction output. |
dim2 |
Numeric vector. Second dimension from data dimensionality reduction output. |
counts |
Integer matrix. Rows represent features and columns represent cells. |
features |
Character vector. Features in the rownames of counts to plot. |
headers |
Character vector. If 'NULL', the corresponding rownames are used as labels. Otherwise, these headers are used to label the features. |
normalize |
Logical. Whether to normalize the columns of 'counts'.
Default |
zscore |
Logical. Whether to scale each feature to have a mean 0
and standard deviation of 1. Default |
exactMatch |
Logical. Whether an exact match or a partial match using
|
trim |
Numeric vector. Vector of length two that specifies the lower
and upper bounds for the data. This threshold is applied after row scaling.
Set to NULL to disable. Default |
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". |
colorLow |
Character. A color available from 'colors()'. The color will be used to signify the lowest values on the scale. Default 'blue'. |
colorMid |
Character. A color available from 'colors()'. The color will be used to signify the midpoint on the scale. Default 'white'. |
colorHigh |
Character. A color available from 'colors()'. The color will be used to signify the highest values on the scale. Default 'red'. |
midpoint |
Numeric. The value indicating the midpoint of the
diverging color scheme. If |
ncol |
Integer. Passed to facet_wrap. Specify the number of columns for facet wrap. |
The plot as a ggplot object
data(celdaCGSim, celdaCGMod) celdaTsne <- celdaTsne( counts = celdaCGSim$counts, celdaMod = celdaCGMod ) plotDimReduceFeature( dim1 = celdaTsne[, 1], dim2 = celdaTsne[, 2], counts = celdaCGSim$counts, normalize = TRUE, features = c("Gene_99"), exactMatch = TRUE )