Performs UMAP reduction on defined method-assays and supplied reductions or graphs.

perform.umap(
  object,
  assay,
  reduction = NULL,
  graph = NULL,
  reduction.name.suffix = "",
  dims.use = NULL,
  n_components = 2,
  n_neighbors = 30,
  metric = "cosine",
  min_dist = 0.3,
  verbose = FALSE,
  seed = 1234,
  ...
)

Arguments

object

IBRAP S4 class object

assay

Character. String containing indicating which assay to use

reduction

Character. String defining which reduction to supply to the UMAP algorithm. Default = NULL

graph

Character. If you wish to UMAP project a previously created connectivity graph (i.e. BBKNN output) supply the graph name here with reductions set to NULL. Default = NULL

reduction.name.suffix

Character. What should be appended to the end of umap as the reduction name.

n_components

Numerical. How many UMAP dimensions should be produced, if you are supplying graphs, only 2 dimensions can be produced. Default = 3

n_neighbors

Numerical. How many neighbours should be identified per cell. A higher value typically returns more accurate results. Default =

verbose

Logical. Should system information be printed. Default = FALSE

seed

Numeric. What should the seed be set as. Default = 1234

...

Numerical. Arguments to be passed to Seurat::RunUMAP

n.dims

Numerical. The number of UMAP dimensions to be produced. Must be supplied in list format relative to the order of reductions

Value

UMAP reduction saved in the visualisation_reductions section in the supplied method-assays

Examples


# How to perform umap reduction on a previous reduction 
object <- perform.umap(object = object, 
                       assay = c('SCT', 'SCRAN', 'SCANPY'), 
                       reduction = c('pca'), 
                       n_components = 2, 
                       n.dims = list(1:12))
#> Error in is(object = object, class2 = "IBRAP"): object 'object' not found
                       
# How to perfrom umap reduction on neighbourhood graphs
object <- perform.umap(object = object, 
                       assay = c('SCT', 'SCRAN', 'SCANPY'), 
                       graph = 'pca_bbknn_bbknn')
#> Error in is(object = object, class2 = "IBRAP"): object 'object' not found