ProjectUMAP: Project query into UMAP coordinates of a reference

Description Usage Arguments

View source: R/generics.R

Description

This function will take a query dataset and project it into the coordinates of a provided reference UMAP. This is essentially a wrapper around two steps:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
ProjectUMAP(query, ...)

## Default S3 method:
ProjectUMAP(
  query,
  query.dims = NULL,
  reference,
  reference.dims = NULL,
  k.param = 20,
  nn.method = "annoy",
  n.trees = 50,
  annoy.metric = "cosine",
  l2.norm = FALSE,
  cache.index = TRUE,
  index = NULL,
  neighbor.name = "query_ref.nn",
  reduction.model,
  ...
)

## S3 method for class 'DimReduc'
ProjectUMAP(
  query,
  query.dims = NULL,
  reference,
  reference.dims = NULL,
  k.param = 20,
  nn.method = "annoy",
  n.trees = 50,
  annoy.metric = "cosine",
  l2.norm = FALSE,
  cache.index = TRUE,
  index = NULL,
  neighbor.name = "query_ref.nn",
  reduction.model,
  ...
)

## S3 method for class 'Seurat'
ProjectUMAP(
  query,
  query.reduction,
  query.dims = NULL,
  reference,
  reference.reduction,
  reference.dims = NULL,
  k.param = 20,
  nn.method = "annoy",
  n.trees = 50,
  annoy.metric = "cosine",
  l2.norm = FALSE,
  cache.index = TRUE,
  index = NULL,
  neighbor.name = "query_ref.nn",
  reduction.model,
  reduction.name = "ref.umap",
  reduction.key = "refUMAP_",
  ...
)

Arguments

query

Query dataset

...

Additional parameters to RunUMAP

query.dims

Dimensions (columns) to use from query

reference

Reference dataset

reference.dims

Dimensions (columns) to use from reference

k.param

Defines k for the k-nearest neighbor algorithm

nn.method

Method for nearest neighbor finding. Options include: rann, annoy

n.trees

More trees gives higher precision when using annoy approximate nearest neighbor search

annoy.metric

Distance metric for annoy. Options include: euclidean, cosine, manhattan, and hamming

l2.norm

Take L2Norm of the data

cache.index

Include cached index in returned Neighbor object (only relevant if return.neighbor = TRUE)

index

Precomputed index. Useful if querying new data against existing index to avoid recomputing.

neighbor.name

Name to store neighbor information in the query

reduction.model

DimReduc object that contains the umap model

query.reduction

Name of reduction to use from the query for neighbor finding

reference.reduction

Name of reduction to use from the reference for neighbor finding

reduction.name

Name of projected UMAP to store in the query

reduction.key

Value for the projected UMAP key


ibseq/scs-analysis documentation built on Feb. 27, 2021, 12:35 a.m.