Function for building a Symphony reference starting from expression matrix
buildReference(
exp_ref,
metadata_ref,
vars = NULL,
K = 100,
verbose = FALSE,
do_umap = TRUE,
do_normalize = TRUE,
vargenes_method = "vst",
vargenes_groups = NULL,
topn = 2000,
tau = 0,
theta = 2,
save_uwot_path = NULL,
d = 20,
additional_genes = NULL,
umap_min_dist = 0.1,
seed = 111
)Symphony reference object. Integrated embedding is stored in the $Z_corr slot. Other slots include cell-level metadata ($meta_data), variable genes means and standard deviations ($vargenes), loadings from PCA ($loadings), original PCA embedding ($Z_orig), reference compression terms ($cache), betas from Harmony integration ($betas), cosine normalized soft cluster centroids ($centroids), centroids in PC space ($centroids_pc), and optional umap coordinates ($umap$embedding).
Reference gene expression (genes by cells)
Reference cell metadata (cells by attributes)
Reference variables to Harmonize over e.g. c('donor', 'technology')
Number of soft cluster centroids in model
Verbose output
Perform UMAP visualization on harmonized reference embedding
Perform log(CP10K+1) normalization
Variable gene selection method (either 'vst' or 'mvp')
Name of metadata column specifying groups for variable gene selection. If not NULL, calculate topn variable genes in each group separately, then pool
Number of variable genes to subset by
Tau parameter for Harmony step
Theta parameter(s) for Harmony step
Absolute path to save the uwot model (used if do_umap is TRUE)
Number of PC dimensions
Any custom genes (e.g. marker genes) to include in addition to variable genes
umap parameter (see uwot documentation for details)
Random seed