make.cocoa.Rd
Counterfactual confounder adjustment for individual-level differential expression analysis
make.cocoa(
mtx.data,
celltype,
cell2indv,
indv2exp = NULL,
knn = 10,
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,
...
)
fileset.header ($mtx, $row, $col, $idx)
celltype/cluster assignments (cells x 2 mapping, cells x 1, or just a single string)
cell-level individual assignments (cells x 2), cell -> indv
individual treatment/exposure assignments (indiv x 2), indv -> exposure
number of neighbours k
in kNN for matching
celltype/cluster assignment matrix (cells x cell types)
SVD rank for spectral matching
take log(1 + x) trans or not
regularization parameter (default = 1)
column normalization for SVD
EM iteration for factorization (default: 0)
EM convergence (default: 1e-4)
number of threads for multi-core processing
imputation by kNN weighting (default: FALSE)
hyperparameter for gamma(a0, b0) (default: 1)
hyperparameter for gamma(a0, b0) (default: 1)
small number (default: 1e-8)
a list of sufficient statistics matrices
If treatment/exposure variables are assigned, it will calculate
counterfactual individual effects (resid.mu
). Otherwise, it will
only compute average effect estimations (mu
).