Skip to contents

plot_reduceddim performs the dimensionality reduction

Usage

plot_reduceddim(
  ref_sce,
  sce_list,
  name_vec,
  assay_use = "logcounts",
  pc_umap = TRUE,
  n_pc = 50,
  center = TRUE,
  scale. = TRUE,
  if_plot = TRUE,
  shape_by = NULL,
  color_by,
  point_size = 1
)

Arguments

ref_sce

The reference sce.

sce_list

A list of synthetic sce.

name_vec

A vector of the names of each dataset. The length should be length(sce_list) + 1, where the first name is for ref_sce.

assay_use

A string which indicates the assay you will use in the sce. Default is 'logcounts'.

pc_umap

A logic value of whether using PCs as the input of UMAP. Default is TRUE.

n_pc

An integer of the number of PCs.

center

A logic value of whether centering the data before PCA. Default is TRUE.

scale.

A logic value of whether scaling the data before PCA. Default is TRUE.

if_plot

A logic value of whether returning the plot. If FALSE, return the reduced dimensions of each dataset.

shape_by

A string which indicates the column in colData used for shape.

color_by

A string which indicates the column in colData used for color.

point_size

A numeric value of the point size in the final plot. Default is 1.

Value

The ggplot or the data.frame of reduced dimensions.

Details

This function takes a reference sce and a list of new sces, performs the dimensionality reduction on the reference data, projects the synthetic datasets on the same low dimensional space, then visualize the results.