CFITIntegrate: Integration of multiple data source.

Description Usage Arguments Value

View source: R/data_integration.R

Description

Solve the model parameters through Iterative Nonnegative Matrix Factorization (iNMF), by minimizing the objective function

1/N ∑_j||X_j -(H_jW^TΛ_j + 1_{n_j} b_j^T)||_F^2

with penalties.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
CFITIntegrate(
  X.list,
  r = 15,
  max.niter = 100,
  tol = 1e-05,
  nrep = 1,
  init = NULL,
  future.plan = c("sequential", "transparent", "multicore", "multisession", "cluster"),
  workers = parallel::detectCores() - 1,
  verbose = T,
  seed = 0
)

Arguments

X.list

a list of m ncells-by-ngenes, gene expression matrices from m data sets

r

scalar, dimension of common factor matrix, which can be chosen as the rough number of identifiable cells types in the joint population (default 15).

max.niter

integer, max number of iterations (default 100).

tol

numeric scalar, tolerance used in stopping criteria (default 1e-5).

nrep

integer, number of repeated runs (to reduce effect of local optimum, default 1)

init

a list of parameters for parameter initialization. The list either contains all parameter sets: W,lambda.list, b.list, H.list, or only W will be used if provided (default NULL).

future.plan

plan for future parallel computation, can be chosen from 'sequential','transparent','multicore','multisession' and 'cluster'. Default is 'sequential'. Note that Rstudio does not support 'multicore'.

workers

additional parameter for future::plan(), in cases of 'multicore','multisession' and 'cluster'.

verbose

boolean scalar, whether to show extensive program logs (default TRUE)

seed

random seed used (default 0)

Value

a list containing

W

ngenes-by-r numeric matrix, estimated common factor matrix

H.list

A list of m factor loading matrix of size ncells-by-r, estimated factor loading matrices

b.list

A list of estimated shift vector of size p (ngenes).

lambda.list

A list of estimated scaling vector of size p (ngenes).

convergence

boolean, whether the algorithm converge

obj

numeric scalar, value of the objective function at convergence or when maximum iteration achieved

niter

integer, the iteration at convergence (or maximum iteration if not converge)

delta

numeric scalar, the relative difference in last objective update

params

list of parameters used for the algorithm: max.iter, tol, nrep


pengminshi/cFIT documentation built on July 11, 2021, 11:12 p.m.