perform.umap: Performs UMAP reduction

Description Usage Arguments Value Examples

View source: R/perform.umap.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
perform.umap(
  object,
  assay,
  reduction = NULL,
  graph = NULL,
  reduction.name.suffix = "",
  n.dims = NULL,
  n_components = 2,
  n_neighbors = 30,
  metric = "cosine",
  min_dist = 0.3,
  ...
)

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.dims

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

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 =

...

Numerical. Arguments to be passed to Seurat::RunUMAP

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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))
                       
# How to perfrom umap reduction on neighbourhood graphs
object <- perform.umap(object = object, 
                       assay = c('SCT', 'SCRAN', 'SCANPY'), 
                       graph = 'pca_bbknn_bbknn')
                      
                      

connorhknight/IBRAP_no_decontX documentation built on Feb. 13, 2022, 2:32 p.m.