Skip to contents

Plots the first 2 dimensions of the rows and columns in the same plot.

Usage

bicplot(
  obj,
  xdim = 1,
  ydim = 2,
  princ_coords = 1,
  row_labels = NULL,
  col_labels = NULL,
  type = "ggplot",
  show_all = TRUE,
  show_rm = FALSE,
  ...
)

# S4 method for caclust
bicplot(
  obj,
  xdim = 1,
  ydim = 2,
  princ_coords = 1,
  row_labels = NULL,
  col_labels = NULL,
  type = "ggplot",
  show_all = TRUE,
  show_rm = FALSE,
  ...,
  caobj
)

# S4 method for SingleCellExperiment
bicplot(
  obj,
  xdim = 1,
  ydim = 2,
  princ_coords = 1,
  row_labels = NULL,
  col_labels = NULL,
  type = "ggplot",
  show_all = TRUE,
  show_rm = FALSE,
  ...,
  caclust_meta_name = "caclust",
  cacomp_meta_name = "CA"
)

Arguments

obj

caclust or SingleCellExperiment object containing clustering results. The SingleCellExperiment should also have a CA dimensional reduction.

xdim

Integer. The dimension for the x-axis. Default 1.

ydim

Integer. The dimension for the y-axis. Default 2.

princ_coords

Integer. If 1 then principal coordinates are used for the rows, if 2 for the columns. Default 1 (rows).

row_labels

Numeric vector. Indices for the rows for which a label should be added (label should be stored in rownames). Default NULL.

col_labels

Numeric vector. Indices for the columns for which a label should be added (label should be stored in colnames). Default NULL (no columns).

type

String. Type of plot to draw. Either "ggplot" or "ggplotly". Default "ggplot".

show_all

logical. If FALSE cells/genes that are not in col_metadata/ row_metadata are not plotted. If *_metadata is NULL, the cell or genes respectively will still be plotted.

show_rm

Show pruned genes during biclustering.

...

Further arguments.

caobj

An object of class "cacomp" with the relevant standardized and principal coordinates calculated.

caclust_meta_name

the name of caclust object stored in metadata(SingleCellExperiment object). Default: 'caclust.'

cacomp_meta_name

Character. The name of cacomp object stored in metadata(SingleCellExperiment object). Default: 'caobj'.

Value

Plot of class "ggplotly" or "ggplot".

Details

Choosing type "ggplotly" will generate an interactive html plot with the package ggplotly. Type "ggplot" generates a static plot. Depending on whether `princ_coords` is set to 1 or 2 either the principal coordinates of either the rows (1) or the columns (2) are chosen. For the other the standard coordinates are plotted (assymetric biplot). Labels for rows and columns should be stored in the row and column names respectively.