PlotTSNE {CHETAH} | R Documentation

## Plots a variable on a t-SNE

### Description

Plots a variable on a t-SNE

### Usage

    PlotTSNE(toplot, input, redD = NA, col = NULL, return = FALSE,
      limits = NULL, pt.size = 1, shiny = NULL, y_limits = NULL,
      x_limits = NULL, legend_label = "")

### Arguments

`toplot` | the variable that should be plotted. Either a character vector or a factor, or a (continuous) numeric. If toplot is not named with the rownames of `redD`, it is assumed that the order of the two is the same.
`input` | a SingleCellExperiment on which `CHETAHclassifier` has been run
`redD` | the name of the reducedDim of the input to use for plotting
`col` | a vector of colors. If `toplot` is a numeric, this will become a continuous scale. If `toplot` is a charachter vector, the colors should be named with the unique values (/levels) of toplot
`return` | instead of printing, return the ggplot object
`limits` | the limits of the continuous variable to plot. When not provided the minimal and maximal value will be used
`pt.size` | the point-size
`shiny` | Needed for the shiny application: should always be NULL
`y_limits` | the y-axis limits
`x_limits` | the x-axis limits, if NULL
`legend_label` | the label of the legend

### Value

A ggplot object

### Examples

    CD8 <- assay(input_mel)['CD8A', ]
    PlotTSNE(toplot = CD8, input = input_mel)

[Package CHETAH version 1.0.5 Index]