plotFeatures: Plot features (cells or regions) based on dimensionality...

View source: R/PlotCells.R

plotFeaturesR Documentation

Plot features (cells or regions) based on dimensionality reduction over cell-topic or topic-region distributions

Description

Plot features (cells or regions) based on dimensionality reduction over cell-topic or topic-region distributions

Usage

plotFeatures(
  object,
  target,
  method = "tSNE",
  colorBy = NULL,
  dim = 2,
  intervals = 10,
  topic_contr = NULL,
  topics = NULL,
  col.low = "pink",
  col.mid = "red",
  col.high = "darkred",
  labels = 3,
  colVars = list(),
  plot_ly = FALSE,
  legend = TRUE,
  cex.legend = 0.7,
  factor.min = 0.05,
  factor.max = 0.75,
  cex.dot = 1,
  ...
)

Arguments

object

Initialized cisTopic object, after the object@dr has been filled.

target

Whether dimensionality reduction should be applied on cells ('cell') or regions (region). Note that for speed and clarity reasons, dimesionality reduction on regions will only be done using the regions assigned to topics with high confidence (see binarizecisTopics()).

method

Select the dimensionality reduction method to use for plotting: 'tSNE', 'Umap', 'PCA', 'Biplot', 'DM' (for Diffusion Map).

colorBy

Select the cell metadata used to colour the plots with. By default, all features are used.

dim

Dimensions to use in the plot (2 or 3). Biplot is only doable in 2D.

intervals

Intervals to apply on the color palette for coloring continuous variables. By default, it is 10.

topic_contr

Color by topic distribution ('Z-score' or 'Probability').

topics

Vector containing the numbers of the topics for which the plot has to be made if topic_contr is not null.

col.low

Color to use for lowest topic enrichment

col.mid

Color to use for medium topic enrichment

col.high

Color to use for high topic enrichment

labels

Labels for the Z-score in the continuous variables plots

plot_ly

Whether plot_ly should be used for the plots

legend

Whether plots should be given with a legend. If FALSE, the legend is given in an independent following plot.

cex.legend

Size of the legend

cex.dot

Size of the dot

...

Ignored.

colsVar

List specifying the colors to use for each label in each colouring level for cell metadata

Value

Plots cell states based on the dimensionality reduction method selected, coloured by the given metadata (one plot per feature).


aertslab/cisTopic documentation built on April 6, 2024, 9:31 p.m.