OptiK: Find the optimal k-weight parameter for KNN

View source: R/Optik.R

OptiKR Documentation

Find the optimal k-weight parameter for KNN

Description

This function iterates through a select range of k-weight parameters and stores the optimal parameter in the Seurat object

Usage

OptiK(
  data,
  lab = "seurat_clusters",
  range = c(10, 100),
  dims = 30,
  perc = 20,
  num = NA,
  seed = 1984
)

Arguments

data

Reference Seurat object

lab

The reference label to treat as clusters. Default is "seurat_clusters"

range

The range of k-weight values to loop through. Default is 10-100.

dims

The number of PCs to consider when discovering anchors

perc

The percent of cells to subsample from the refeerence for the test query. Default is 20%.

num

If perc = F, OptiK will look for a specific number of cells specified here.

seed

Set the seed for reproducible results. Default = 1984.

Value

Returns a Seurat object with a new slot where the k-weight is stored: misc$CellTools$opti_k


TrakhtenbergLab/CellTools documentation built on Aug. 21, 2023, 2:39 p.m.