Label some cells on a 2D plot
plot_label_dimplot.Rd
This function is similar to Seurat::DimPlot or Seurat::FeaturePlot. It is used to label particular cells, for instance root cell for trajectory inference. NOTE : For the moment, there is a problem where stroke_color contains multiple colors. The multiple colors are not displayed and all strokes are grey...
Usage
plot_label_dimplot(
sobj,
reduction = NULL,
pt_size = 0.5,
label_by = NULL,
label_val = NULL,
col_by = NULL,
col_color = NULL,
add_label = TRUE,
add_stroke = TRUE,
stroke_color = "yellow"
)
Arguments
- sobj
A Seurat object (no default)
- reduction
CHARACTER : the reduction to plot. It must be one of names(sobj@reductions). By default, takes the first one (default to NULL)
- pt_size
NUMERIC : point size (default to 0.5)
- label_by
CHARACTER : the column name where label criteria is. It must be something that can be found with Seurat::FetchData. By default, takes the cell barcode (default to NULL)
- label_val
VECTOR : a vector specifying the value label_by to highlight cells or not. in By default, takes the first cell barcode (default to NULL)
- col_by
CHARACTER : the column name to color cells by. It must be something that can be found with Seurat::FetchData. By default, takes Seurat::Idents (default to NULL)
- col_color
VECTOR : color vector to color cells with (default to NULL, i.e. ggplot default palette)
- add_label
LOGICAL : whether to label cells by the label_val or not (default to TRUE)
- add_stroke
LOGICAL : whether to add a circle around labelled cells (default to TRUE)
- stroke_color
CHARACTER : a column name to highlight cells by (found by Seurat::FetchData). If not found, it must be a color name to color stroke by (default to "yellow")