plot_emb_circle_scale {tricycle} | R Documentation

## Plot embedding with cyclic cell cycle position

### Description

Generate scat plot of embedding with cyclic cell cycle position or other cyclic variables

### Usage

    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
    )

### Arguments

`sce.o` | A SingleCellExperiment contains the embbing to be plotted against.
`color_by` | The name of variable in `colData(sce.o)` to be used to show colors. Default: "tricyclePosition"
`facet_by` | he name of variable in `colData(sce.o)` to be used to facet scatter plots. If NULL, no faceted panles will be returned. Default: NULL
`dimred` | The name or index of reducedDims in SingleCellExperiment (`reducedDims`). Default: 1
`dim` | The indices of `dimred` to be plotted. At the moment, it has to be two integers. Default: 1:2
`fig.title` | The title of the figure. Default: NULL
`point.size` | The size of the point in scatter plot used by `geom_scattermore`. Default: 2.1
`point.alpha` | The alpha value (transparency) of the point in scatter plot used by `geom_scattermore`. Default: 0.6
`x_lab` | Title of x-axis. If not given, the colname of `dimred` will be used. Default: NULL
`y_lab` | Title of y-axis. If not given, the colname of `dimred` will be used. Default: NULL
`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 `circle_scale_legend` instead. Default: FALSE

### Details

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.

### Value

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.

### Author(s)

Shijie C. Zheng

### Examples

    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)

[Package tricycle version 1.0.0 Index]