View source: R/plot_emb_circle_scale.R
plot_emb_circle_scale | R Documentation |
Generate scat plot of embedding with cyclic cell cycle position or other cyclic variables
plot_emb_circle_scale( sce.o, color_by = "tricyclePosition", facet_by = NULL, dimred = 1, dim = seq_len(2), fig.title = NULL, point.size = 2.1, point.alpha = 0.6, x_lab = NULL, y_lab = NULL, hue.colors = c("#2E22EA", "#9E3DFB", "#F86BE2", "#FCCE7B", "#C4E416", "#4BBA0F", "#447D87", "#2C24E9"), hue.n = 500, plot.legend = FALSE )
sce.o |
A SingleCellExperiment contains the embbing to be plotted against. |
color_by |
The name of variable in |
facet_by |
The name of variable in |
dimred |
The name or index of reducedDims in SingleCellExperiment ( |
dim |
The indices of |
fig.title |
The title of the figure. Default: NULL |
point.size |
The size of the point in scatter plot used by |
point.alpha |
The alpha value (transparency) of the point in scatter plot used by |
x_lab |
Title of x-axis. If not given, the colname of |
y_lab |
Title of y-axis. If not given, the colname of |
hue.colors |
The string vector gives the cyclic colors. The first color should look very similar to the last one. Default: c("#2E22EA", "#9E3DFB", "#F86BE2", "#FCCE7B", "#C4E416", "#4BBA0F", "#447D87", "#2C24E9") |
hue.n |
The number of breaks of color scheme. Default: 500 |
plot.legend |
Whether the legend should be plotted with the scatter plot. We recommend not to use this legend but use the cyclic legend produced by |
This function help users plot embedding scater plot colored by cyclic variables, such as cell cycle position, which is bound between 0 - 2pi.
It will take a SingleCellExperiment object as input, and plot out its dimred
such as PCA, UMAP, and etc with a cyclic color scheme.
A ggplot object or a list of ggplot objects.
If facet_by
is not assigned, a single ggplot plot of the scatter plot will be return,
Otherwise, apart from the first scatter plot showing all cells together, other faceted scatter plots will also be given in the list.
Shijie C. Zheng
data(neurosphere_example, package = "tricycle") neurosphere_example <- estimate_cycle_position(neurosphere_example) plot_emb_circle_scale(neurosphere_example, point.size = 3.1, point.alpha = 0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.