Description Usage Arguments Value Author(s) Examples
View source: R/visualization.R
Plot the embedding for the dataset, with cells from select clusters coloured
by either their original colours or provided colours, and cells from all
other clusters in another (non-intrusive) colour, or not at all. This is a
thin wrapper for tsne
which takes care of specifying cells and colours
in order to highlight the desired clusters.
1 2 3 |
seurat |
Seurat object, where Seurat::RunTSNE() has been applied |
clusters |
Vector of one or more clusters to highlight, matching the levels at
|
cells |
Character vector of cell IDs specifying cells to highlight. |
original_colours |
(Optional) Vector of colours to use. Either one colour
per cluster, in the order of |
default_colour |
String, colour to use for non-highlighted clusters, or "none", if cells in those clusters should not be plot at all. Default: gray80 (light grey). |
label_all |
Logical, if labelling the tSNE (if |
... |
Arguments passed on to
|
A ggplot2 object
Selin Jessa
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Highlight cluster 3 on the tSNE plot
highlight(pbmc, 3)
# Pass additional arguments to cytobox::tsne
highlight(pbmc, c(2, 3), label = FALSE, title = "Test highlight")
# Change default colour
highlight(pbmc, c(2, 3), default_colour = "lightblue")
# Specify the colours to highlight the clusters with
highlight(pbmc, c(2, 3), c("red", "blue"))
# Don't plot cells in other clusters
highlight(pbmc, c(2, 3), default_colour = "none")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.