API Reference¶
Below is the main function reference for ENIGMA. Notice that the package is under active development, and some features may not be stable yet.
create_ENIGMA¶
# Class Definition
create_ENIGMA(
bulk,
ref,
ref_type = c("single_cell", "bulk"),
meta_bulk = NULL,
meta_ref = NULL,
assay = NULL
)
bulk: raw bulk data matrix
ref: raw reference data, could be single cell (matrix, SingleCellExperiment object or Seurat object) or FACS bulk
ref_type: Determine the reference type. Should be either “single_cell” or “bulk”.
meta_bulk: metadata of bulk matrix
meta_ref: metadata of reference
ENIGMA_L2_max_norm¶
# Class Definition
ENIGMA_L2_max_norm(
object,
alpha = 0.5,
tao_k = 0.01,
beta = 8000,
epsilon = 0.001,
max.iter = 1000,
verbose = TRUE,
infer = FALSE,
pos = TRUE
)
object: ENIGMA object
alpha: ENIGMA is a multi-objective optimization problem involve two object function, the distance function between observed bulk RNA-seq and reconstitute RNA-seq generated by weighted combination of CSE, and the distance function beween average CSE expression and cell type reference matrix. The alpha is used to determine weights of these two objects. If the alpha gets larger, the optimization attach greater importance on the the first object. Default: 0.5
tao_k: The step size of each round of gradient decent. Default: 0.01
beta: The regularization parameter to penalize the weight (deconvoluted expression) matrices from being too large. Default: 8000
epsilon: Determine the stop condition in CSE updating. Default: 0.001
max.iter: The maximum number of iterations. Default: 1000
verbose: Whether return the information after each step of processing. Default: TRUE
infer: Whether return the re-estimated cell type fractions. Default: FALSE
pos: Whether set all entries in CSE is positive. Default: TRUE
ENIGMA_trace_norm¶
# Class Definition
ENIGMA_trace_norm(
object,
alpha = 0.5,
beta = 100,
gamma = 1,
epsilon = 1e-04,
max.iter = 100,
verbose = TRUE
)
object: ENIGMA object
alpha: ENIGMA is a multi-objective optimization problem involve two object function, the distance function between observed bulk RNA-seq and reconstitute RNA-seq generated by weighted combination of CSE, and the distance function beween average CSE expression and cell type reference matrix. The alpha is used to determine weights of these two objects. If the alpha gets larger, the optimization attach greater importance on the the first object. Default: 0.5
beta: This parameter is used to control the latent dimension of each CSE, if this parameter gets larger, than the latent dimension of each CSE is smaller (lower trace norm value), which means that each sample is more similar with each others. The user need to tune this parameter based on the range of the singular value of the bulk RNA-seq matrix. Default: 100
gamma: This parameter is used to control the distance between CSE (X) and auxiliary variable (Y). Default: 1
epsilon: In trace norm based ENIGMA, the epsilon is not necessarily choose a extremly small value, the number of iteration would influence the latent dimensions of CSE, as each step is performing singular value thresholding. Default: 0.0001
max.iter: The maximum number of iterations. Default: 100
verbose: Whether return the information after each step of processing. Default: TRUE