Counterfactual confounder adjustment by by Pairwise INdividual Effect matching

make.pine(
  mtx.data,
  celltype,
  cell2indv,
  V = NULL,
  knn.cell = 50,
  knn.indv = 1,
  celltype.mat = NULL,
  .rank = 10,
  .take.ln = TRUE,
  .pca.reg = 1,
  .col.norm = 10000,
  .em.iter = 0,
  .em.tol = 1e-04,
  num.threads = 1,
  impute.by.knn = FALSE,
  remove.dup = TRUE,
  ...
)

Arguments

mtx.data

fileset.header ($mtx, $row, $col, $idx)

celltype

celltype/cluster assignments (cells x 2 mapping, cells x 1, or just a single string)

cell2indv

cell-level individual assignments (cells x 2), cell -> indv

celltype.mat

celltype/cluster assignment matrix (cells x cell types)

.rank

SVD rank for spectral matching

.take.ln

take log(1 + x) trans or not

.pca.reg

regularization parameter (default = 1)

.col.norm

column normalization for SVD

.em.iter

EM iteration for factorization (default: 0)

.em.tol

EM convergence (default: 1e-4)

num.threads

number of threads for multi-core processing

impute.by.knn

imputation by kNN weighting (default: FALSE)

remove.dup

remove duplicated pairs (default: TRUE)

eps

small number (default: 1e-8)

knn

number of neighbours k in kNN for matching

a0

hyperparameter for gamma(a0, b0) (default: 1)

b0

hyperparameter for gamma(a0, b0) (default: 1)

Value

a list of sufficient statistics matrices