run_kdist: Run K-distance with CellTrek(Seurat) object and add a...

View source: R/scoloc.R

run_kdistR Documentation

Run K-distance with CellTrek(Seurat) object and add a metadata column

Description

Run K-distance with CellTrek(Seurat) object and add a metadata column

Usage

run_kdist(
  celltrek_inp,
  grp_col = "cell_type",
  ref = NULL,
  ref_type = "all",
  que = NULL,
  k = 10,
  new_name = "kdist",
  keep_nn = F
)

Arguments

celltrek_inp

SChart seurat input

grp_col

Column name in meta data for reference and query groups

ref

Reference groups

ref_type

'all' or 'each'

que

Query groups

k

The number of nearest neighbors

new_name

New name for kdist

keep_nn

Keep Nearest Neighboor id matrix?

Value

SChart seurat output

Examples

celltrek_test <- run_kdist(celltrek_inp=celltrek_inp, grp_col='cell_type', ref=c('A', 'B'), ref_type='each', que=unique(test_df$cell_names), k=10)

navinlabcode/CellTrek documentation built on April 15, 2022, 8:04 a.m.