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

References

Rheaume, B. A., & Trakhtenberg, E. F. (2022). Self-learning algorithm for denoising and advancing the integration of scRNA-seq datasets improves the identification of resilient and susceptible retinal ganglion cell types bioRxiv.


BruceRheaume/CellTools documentation built on April 24, 2022, 7:03 p.m.