ENIGMA_trace_norm: ENIGMA trace norm version

View source: R/ENIGMA_trace_norm.R

ENIGMA_trace_normR Documentation

ENIGMA trace norm version

Description

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

Usage

ENIGMA_trace_norm(
  object,
  do_cpm = TRUE,
  alpha = 0.5,
  beta = 1,
  tao_k = 1,
  gamma = 0.5,
  epsilon = 0.001,
  epsilon_ks = 0.001,
  max_ks = 1,
  max.iter = 1000,
  solver = "proximalpoint",
  verbose = FALSE,
  pos = TRUE,
  Normalize = TRUE,
  Norm.method = "frac",
  preprocess = "log",
  loss_his = FALSE,
  print_loss = FALSE,
  model_tracker = FALSE,
  model_name = NULL,
  X_int = NULL,
  calibrate = 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

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

tao_k

step size for proximal point method. Default: 1

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

epsilon_ks

Minimum error between the conditional number score (see Supplementary Notes for more details) of iteration i and i+1. Default: 0.001

max_ks

The stop criteria for conditional number score (see Supplementary Notes for more details). Default: 1

max.iter

The maximum number of iterations. Default: 1000

solver

The solver for solving trace norm model. method used: admm, admm_fast or proximal point method

verbose

Whether return the information after each step of processing. Default: TRUE

pos

Set all entries in CSE is positive. Default: TRUE

Normalize

Whether perform normalization on resulted expression profile. Default: TRUE

Norm.method

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

preprocess

Method used to perform variance stablization preprocessing. User could choose sqrt, log or none.sqrt: square root transformation; log: log2(*+1) transformation; none: no data transformation.

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.

calibrate

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

Value

ENIGMA object where object@result_CSE contains the inferred CSE profile, object@result_CSE_normalized would contains normalized CSE profile if Normalize = TRUE, 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_trace_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.