Skip to contents

Reconcile multi-batch matrices by batch-balancing KNN

Usage

asap_bbknn(
  data_nk_vec,
  row_names_vec,
  KNN_PER_BATCH = 3L,
  BLOCK_SIZE = 1000L,
  NUM_THREADS = 1L,
  verbose = TRUE
)

Arguments

data_nk_vec

a list of sample x factor matrices

row_names_vec

a list of sample x 1 names

KNN_PER_BATCH

(default: 3)

BLOCK_SIZE

each parallel job size (default: 100)

NUM_THREADS

number of parallel threads (default: 1)

verbose

(default: TRUE)

Value

a list that contains:

  • adjusted (N x K) matrix

  • bbknn batch-balanced kNN adjacency matrix

  • batches batch membership

  • knn edges