ENIGMA_L2_max_norm: ENIGMA maximum L2 norm version

View source: R/ENIGMA_L2_norm.R

ENIGMA_L2_max_normR Documentation

ENIGMA maximum L2 norm version

Description

maximum L2 norm version is the default version of ENIGMA, which is the regularized weighted matrix completion to constraint the maximum L2 norm of inferred cell type-specific gene expression matrix.

Usage

ENIGMA_L2_max_norm(
  object,
  do_cpm = TRUE,
  alpha = 0.5,
  tao_k = 0.01,
  beta = 0.1,
  epsilon = 0.001,
  max.iter = 1000,
  verbose = FALSE,
  pos = TRUE,
  calibrate = TRUE,
  Norm.method = "frac",
  preprocess = "sqrt",
  loss_his = TRUE,
  model_tracker = FALSE,
  model_name = NULL,
  X_int = NULL,
  Normalize = TRUE
)

Arguments

object

ENIGMA object

do_cpm

if perform cpm normalization to the data, strongly recommand to use to make sure each sample numerical value scale is comparable. Default = TRUE

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: 0.1

epsilon

Determine the stop condition in CSE updating. Default: 0.001

max.iter

The maximum number of iterations. Default: 1000

verbose

Rreturn the information after each step of processing. Default: TRUE

pos

Set all entries in CSE is positive. Default: TRUE

calibrate

calibrate the inferred CSE into input bulk gene expression scale. Default: TRUE

Norm.method

Method used to perform normalization. User could choose PC, frac or quantile

preprocess

Method used to perform variance stablization preprocessing. User could choose none, sqrt or log

loss_his

save the loss value of each round of iteration.

model_tracker

save the model in returned object

model_name

name of the model

X_int

initialization for CSE profiles, an array object with three dimensions (the number of genes * the number of samples * the number of cell types), if user input a matrix (the number of genes * the number of samples), each cell type would be assigned the same start matrix.

force_normalize

when alpha >= 0.9 or profile matrix is not generated from S-mode batch effect correction, ENIGMA would not perform normalization, if user still want to perform normalization, set force_normalize=TRUE. Default: FALSE

Value

ENIGMA object where object@result_CSE contains the inferred CSE profile, object@result_CSE_normalized would contains normalized CSE profile, object@loss_his would contains the loss values of object functions during model training. If model_tracker = TRUE, then above results would be saved in the object@model.

Examples

## Not run: 
egm = ENIGMA_l2max_norm(egm,model_tracker = TRUE, Norm.method="quantile")
egm@result_CSE
egm@result_CSE_normalized

## End(Not run)



WWXkenmo/ENIGMA_test documentation built on March 17, 2023, 4:56 a.m.