Reorder idents by the gene expression
Usage
srt_reorder(
srt,
features = NULL,
reorder_by = NULL,
layer = "data",
assay = NULL,
log = TRUE,
distance_metric = "euclidean",
verbose = TRUE
)Arguments
- srt
A Seurat object.
- features
A character vector or a named list of features to plot. Features can be gene names in Assay or names of numeric columns in meta.data.
- reorder_by
Reorder groups instead of idents.
- layer
Which layer to use. Default is
data.- assay
Which assay to use. If
NULL, the default assay of the Seurat object will be used. When the object also containsChromatinAssay, the default assay and additionalChromatinAssaywill be preprocessed sequentially.- log
Whether log1p transformation needs to be applied. Default is
TRUE.- distance_metric
Metric to compute distance. Default is
"euclidean".- verbose
Whether to print the message. Default is
TRUE.
Examples
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
pancreas_sub <- srt_reorder(
pancreas_sub,
reorder_by = "SubCellType",
layer = "data"
)