plot_dimred: Plot dimensional reduction from SCE

View source: R/plot_dimred.R

plot_dimredR Documentation

Plot dimensional reduction from SCE

Description

Plot dimensional reduction from SCE

Usage

plot_dimred(
  object,
  colour_by,
  colour_list_in_metadata = "colors",
  colours_reduce_labels = TRUE,
  features_add = c(),
  dimred = "UMAP",
  columns = NULL,
  by_exprs_values = "logcounts",
  seed = 12232,
  order = FALSE,
  order_function = function(x) {
     order(x, decreasing = FALSE, na.last = FALSE)
 },
  shuffle = FALSE,
  point_size = 0.5,
  point_alpha = 1,
  max.cutoff = NA,
  min.cutoff = NA,
  scale_color = NULL,
  value_convert = NULL,
  text_by = NULL,
  text_by_colour = "black",
  text_by_dimred_summary_fun = median,
  text_by_size = NA,
  text_by_fontface = "bold",
  text_by_padding = unit(0.01, units = "npc"),
  text_by_fill = alpha(c("white"), 0.75),
  text_repel = TRUE,
  text_repel_max_overlaps = Inf,
  coldata_exclude_class = c("CompressedSplitDFrameList"),
  rasterise = FALSE,
  rasterise_dev = "cairo",
  rasterise_dpi = 300,
  rasterise_scale = 1,
  ...
)

Arguments

object

SingleCellExperiment object

colour_by

Variable to use for coloring

colour_list_in_metadata

If set, function will search for a manual colouring vector in the metadata(sce)[[colour_list_in_metadata]][[colour_by]]

colours_reduce_labels

If TRUE, reduce colour legend to only show values included in the plot

features_add

Fetch additional features to data.frame given to ggplot (for specialized plotting)

dimred

Which dimensional reductions should be used?

columns

Vector of columns in SCE to plot

by_exprs_values

SCE Assay to use

seed

Seed for random operations

order

Should points plotted in order by their value

order_function

What function should be used for ordering?

shuffle

Should points be plotted in random order

point_size

Size of individual points

point_alpha

Alpha level of each point

max.cutoff

Cutoff value for upper limit (can be integer or 'q' value for quantile: 'q95' sets at 95% percentile)

min.cutoff

Cutoff value for lower limit (see max.cutoff)

scale_color

Color scale to use (viridis by default)

value_convert

Function to convert values before plotting (If NULL, no conversion)

text_by

Variable to use for labelling

text_by_colour

Label color if text_by is set (black by default)

text_by_dimred_summary_fun

Which function should be used to place text_by (default median)

text_by_size

Text size if text_by is set

text_by_fontface

Fontface is text_by is set (default "bold")

text_by_padding

Label padding if text_by is set.

text_by_fill

Label fill if text_by is set (alpha("white", 0.75) default)

text_repel

Should text labels be repelled from each other?

text_repel_max_overlaps

Max overlaps for ggrepel

coldata_exclude_class

By default loads all colData except the columns of the classes included in this vector

rasterise

Should points be rasterised (ggrastr)?

rasterise_dev

What device should be used for rasterisation?

rasterise_dpi

What DPI should be used for rasterisation?

rasterise_scale

What scale should be used for rasterisation?

...

Passed on to makePerCellDF

Value

ggplot2 object


Terkild/scutility documentation built on Jan. 16, 2025, 5:28 p.m.