ProjectSNN: Calculates shared nearest neighbors between samples (columns)...

View source: R/similarity.R

ProjectSNNR Documentation

Calculates shared nearest neighbors between samples (columns) in a test matrix and samples in a training matrix Adapted from Seurat

Description

Calculates shared nearest neighbors between samples (columns) in a test matrix and samples in a training matrix Adapted from Seurat

Usage

ProjectSNN(
  test.data,
  train.data,
  n.pcs = NULL,
  features.use = NULL,
  k = 30,
  k.scale = 10,
  prune.SNN = 1/15,
  print.output = T
)

Arguments

test.data

Test data

train.data

Training data

features.use

Subset of features to use (default is all features)

k

Number of nearest neighbors

k.scale

k*k.scale is the number of nearest neighbors to calculate shared nearest neighbors for

prune.SNN

Minimum fraction of shared nearest neighbors

print.output

Prints progress bar if true

pcs.use

If not null, run PCA on training data and project test data before computing SNN

Value

A n.test x n.train matrix with the shared nearest neighbors between test and training data


yanwu2014/swne documentation built on Aug. 5, 2023, 4:42 a.m.